Image Upload Quality
Permalink
I've noticed that the .jpg images I have uploaded that contain flat colored graphics or text are distorting quite a bit when they display in the browser. Image upload seems to be set to LOW, what in Photoshop would be around 3 out of 10. Does anyone know how to go into the code and increase the upload quality for .jpgs?
I found a satisfactory solution to image upload quality. I save my .jpg's now at the highest quality, so that when the code in the concrete5 application degrades the quality it is not visibly noticeable. This way the images are not compressed twice, just once by the C5 code. It would still be nice to know how to go into the code and raise the bar (improve the quality) on the upload of the image though?
Well, I have the exact same problem. Also, the suggested workaround to upload a high quality JPG doesn't do the trick for me. The JPGS look extremely bad. The PNG24 look great but the file size is way too big and therefore not acceptable.
This is would be very disappointing if you could not disable the default image compression in C5...
Does anybody has a solution for this problem?
Thanks.
This is would be very disappointing if you could not disable the default image compression in C5...
Does anybody has a solution for this problem?
Thanks.
take a look at /concrete/helpers/image.php, around line 114, you'll see:
$res2 = imageJPEG($image, $newPath, 80);
change that 80 to something higher to turn off the compression. You may have to rescan your images and clear your cache.
It would be nice if this was set with a global variable.
$res2 = imageJPEG($image, $newPath, 80);
change that 80 to something higher to turn off the compression. You may have to rescan your images and clear your cache.
It would be nice if this was set with a global variable.
Thanks Tony!
I will try that out and post my results here!
I will try that out and post my results here!
I have changed and experimented with the JPEG quality settings in the image.php. without any success (rescan images, empty cache in C5 and browser...)
I also deleted and re-uploaded the images to test it.
The actual quality of the test image set does not change no matter what kind of value I implement in to the image.php. even there is no or zero value...
The strange thing though is that in the C5 file manager the test images are in the correct quality but on the site itself they are "Save for Web....Low quality 10"
Any advice would be appreciated.
Thanks.
I also deleted and re-uploaded the images to test it.
The actual quality of the test image set does not change no matter what kind of value I implement in to the image.php. even there is no or zero value...
The strange thing though is that in the C5 file manager the test images are in the correct quality but on the site itself they are "Save for Web....Low quality 10"
Any advice would be appreciated.
Thanks.
if that's not working then I'm not too sure what's going on. I had a quick look to see if it's running that compression elsewhere but didn't notice anything else that might be causing the problems. any other suggestions out there?
did you clear your browser cache too? I'm adding the global variable AL_THUMBNAIL_JPEG_COMPRESSION to the core so the compression rate is easy to change. seems to be working fine for me now.
Yes, I did clear the browser cache too. I'm in the process of preparing new sets of images (Gif, PNG, JPG). Once this is done I'm going to delete the current image sets on the server.
What I don't understand is that the C5 file manager displays the test images in the correct quality...
Will keep the forum posted regarding the results...
Meanwhile thanks a lot for your help!
What I don't understand is that the C5 file manager displays the test images in the correct quality...
Will keep the forum posted regarding the results...
Meanwhile thanks a lot for your help!
I forgot to ask - when you say: "adding the global variable AL_THUMBNAIL_JPEG_COMPRESSION to the core" is this something I could do as well ...? (Probably a stupid question - but just in case...)
After further testing and uploading a new set of PNG files I have noticed that C5 does not take the new images - even after rescanning, empty cache etc......
In the File manager > Image property it looks like this:
New uploaded image: joanna_mcclure.png
(URL to file:http://www.olex.org/files/4012/7566/1575/joanna_mcclure.png)...
Default Location (/home/olex/public_html/files)
Image displayed on website: joanna_mc_clure_300x194.jpg
Are those issues related to C5 or the actual development of the site? If anybody has an explanation for this please let me know. Thanks.
In the File manager > Image property it looks like this:
New uploaded image: joanna_mcclure.png
(URL to file:http://www.olex.org/files/4012/7566/1575/joanna_mcclure.png)...
Default Location (/home/olex/public_html/files)
Image displayed on website: joanna_mc_clure_300x194.jpg
Are those issues related to C5 or the actual development of the site? If anybody has an explanation for this please let me know. Thanks.
Ok, after experimenting regarding the image quality I found out that it had a lot to do with the cache(s).
This is what did the trick for me:
1. Increase the JPG settings in the "concrete/helpers/file.php (Thanks Tony for the tip)
2. FTP: empty cache in "file/cache"
3. FTP: delete files in "files/custom_folder/custom_folder"
4. CMS: clear cache
5. Upload new images
6. Empty browser cache
This is what did the trick for me:
1. Increase the JPG settings in the "concrete/helpers/file.php (Thanks Tony for the tip)
2. FTP: empty cache in "file/cache"
3. FTP: delete files in "files/custom_folder/custom_folder"
4. CMS: clear cache
5. Upload new images
6. Empty browser cache
I am also experiencing that uploaded image quality is not the same as the original image.
I noticed that now image.php has this code:
$res2 = imageJPEG($image, $newPath, AL_THUMBNAIL_JPEG_COMPRESSION);
Where can I change the quality setting at the moment?
EDIT:
Found the answer:
http://www.concrete5.org/community/forums/customizing_c5/my-c5-sett...
I noticed that now image.php has this code:
$res2 = imageJPEG($image, $newPath, AL_THUMBNAIL_JPEG_COMPRESSION);
Where can I change the quality setting at the moment?
EDIT:
Found the answer:
http://www.concrete5.org/community/forums/customizing_c5/my-c5-sett...