Forum
GD not changing quality of image
I have a new client site on a stock GRID server on MediaTemple. Image manipulation is GD, Perch is the latest. (Health Check and Summary Information at below.)
In my template I have:
<img src="<perch:content type="image" id="image" label="Image" width="640" height="960" crop="true" bucket="mobile slideshow" quality="80" />" alt="<perch:content type="text" id="alt" label="Description" required="true" help="Add a short description of this image" title="true" />" />
No matter what quality number I use (10, 50, 80), the image shown is the one I uploaded. It's not recompressed at all by GD.
Thanks for any insight.
HEALTH CHECK
Perch is up to date PHP 5.5.21 is up to date MySQL 5.1.72-rel14.10 is up to date Image processing available SUMMARY INFORMATION
Perch: 2.8.6, PHP: 5.5.21, MySQL: 5.1.73, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.6), assets (2.8.6), categories (2.8.6) App runtimes: <?php $apps_list = array( 'content', 'categories', ); PERCH_LOGINPATH: /perch PERCH_PATH: /nfs/c11/h04/mnt/206342/domains/700southstrand.com/html/perch PERCH_CORE: /nfs/c11/h04/mnt/206342/domains/700southstrand.com/html/perch/core PERCH_RESFILEPATH: /nfs/c11/h04/mnt/206342/domains/700southstrand.com/html/perch/resources Image manipulation: GD PHP limits: Max upload 20M, Max POST 24M, Memory: 99M, Total max file upload: 20M Resource folder writeable: Yes HTTP_HOST: 700southstrand.com.s206342.gridserver.com DOCUMENT_ROOT: /home/206342/domains/700southstrand.com/html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Frank,
Are you using the same template to display the image or a different template? I ask because, resized or customized images must be output with the exact same tag if output using a different template. Based on the template above you should be getting an output image url of image as imagename-w640h960.jpg, if your just getting imagename.jpg then your template is outputting the original image.
Make Sense?, Does this help you?
RK :)
Thanks for your input, RK.
It's outputting as <img src="/perch/resources/mobile slideshow/mobileslide1-w640h960.jpg" alt="text" /> so it looks like it is being run through GD, but not picking up the compression settings.
Yes, with a URL output with the template dimensions looks to be outputting correctly. I guess we'll just have to wait around and see what Drew has to offer about what's happening here. I honestly don't have a lot of experience on image compression.
Is it always JPEGs you're testing with? Quality has no impact for lossless formats like PNG.
Yes. JPGs.
Do you know which version of GD you're running on the server?
Try:
Here's what was returned:
array(12) { ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(false) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPEG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
Ok, thanks.
Did anything look amiss from the GD installation? I haven't run into this situation before with any other Perch sites. Thanks!
Nothing I can see. I don't know what's causing it and haven't had the time to look into it yet.