Hi,
I have installed the PHP version of CKFinder today and I am extremely pleased with the results so far. I have stumbled across one problem though. I have set my image resize preferences to w=500px, h=400px and when I upload files larger than these dimensions it does indeed scale them correctly and is very effective. However, if my original source image is over approx. 1MB in size the image does get uploaded but no auto-resizing occurs. The image gets uploaded at its full size which is not what I want. If I then insert it, it is way way too big. This goes against the whole point of me setting maximum sizes as it is exactly this scenario that I am trying to avoid.
I have had a good search around the forum and as yet haven't found a solution to this. I wondered if it was more to do with how the PHP connector handles file uploads rather than an issue with CKFinder. I would however welcome any help or assistance with this issue.
Thanks in advance.
I have installed the PHP version of CKFinder today and I am extremely pleased with the results so far. I have stumbled across one problem though. I have set my image resize preferences to w=500px, h=400px and when I upload files larger than these dimensions it does indeed scale them correctly and is very effective. However, if my original source image is over approx. 1MB in size the image does get uploaded but no auto-resizing occurs. The image gets uploaded at its full size which is not what I want. If I then insert it, it is way way too big. This goes against the whole point of me setting maximum sizes as it is exactly this scenario that I am trying to avoid.
I have had a good search around the forum and as yet haven't found a solution to this. I wondered if it was more to do with how the PHP connector handles file uploads rather than an issue with CKFinder. I would however welcome any help or assistance with this issue.
Thanks in advance.
Re: (PHP) Upload and Auto resize of large source images
Image resizing requires a lot of memory resources, when large image is uploaded, default memory_limit is not enough.
That's why there is a setMemoryForImage() function which try to increase the amount of available memory for the resizing process.
Make sure that ini_set is not disabled in php.ini by your server administrator, this also may be the cause why resizing of larger images fails.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: (PHP) Upload and Auto resize of large source images
Re: (PHP) Upload and Auto resize of large source images
Re: (PHP) Upload and Auto resize of large source images
Increasing this value to 6 shouldn't cause any harm.
It was set to the lowest value that seemed to be reasonable (2.4), however it looks like it is still a bit too low by default.
By increasing $TWEAKFACTOR, you're changing the maximum amount of memory allowed to be used by script (memory_limit).
If you set this to 10000 for example, it will have the same effect as setting memory_limit to -1. PHP will simply use as much memory as it needs to resize the image.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: (PHP) Upload and Auto resize of large source images
I have now the case that we try to upload an image with the following specs:
- Size: 13MB
- Pixel: 6520 x 4865 @ 240 DPI
The uploading is going till the end, than message "Ungültige Datei" - "Invalid File" appears.
We set the php.ini to memory_usage of 500 and we changed the TWEAKFACTOR = 50;
But still not working.
Any other suggestions?
Thanks for help
Oliver
Re: (PHP) Upload and Auto resize of large source images
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: (PHP) Upload and Auto resize of large source images
Hi!
I've a similar problem. When I upload large images (3MB for example), ckfinder show me an error because "File size is too big". I can't find any config problem, what can I do?
Re: (PHP) Upload and Auto resize of large source images
memory_limit
upload_max_filesize
post_max_size
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: (PHP) Upload and Auto resize of large source images
Thanks a lot for the reply:
So, the problem is there, right? Changing upload_max_filesize to 10mb and post_max_size to a higher value will allow images of 10mb to be uploaded with ckfinder?
Thanks a lot
Re: (PHP) Upload and Auto resize of large source images
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+