Jump to content

Image Quality Setting


Recommended Posts

I have just started using PrestaShop, and so far it is just about perfect. However, I noticed that images that are uploaded are recompressed in JPG format, in a very low quality compression ratio. It looks like it could be at 60% or even less!

For the logo, it is easy to just edit the template and point directly to a nice PNG. But for the products, I need to make use of all the auto-sizing that is done.

Is there a setting somewhere where I can change the JPG compression ratio to something like 80% or higher?

Some of my products look really ugly, even though the source image is high quality.

Thanks!

Link to comment
Share on other sites

PS uses standard PHP functions for image manipulation, so it is sufficient that you have someone change PHP. Or do it yourself, of course. Another possibility is to upgrade your PHP to a higher version, maybe. And make sure that GD is enabled.

Check /images.inc.php to verify that there is no hidden or mysterious parameter playing tricks on you.

Maybe you just have a gigo problem.

Link to comment
Share on other sites

I know it uses GD. That's not the issue. The issue is the quality setting it is saving files as. As you may (or may not) know, JPEG can be saved at various levels of compression. This is usually a number between 1-100. For reasonable image quality, a setting of 65 or higher is required. By the looks of things, I think a setting of under 50 is being used by PrestaShop (through GD, as you mentioned), which makes product images (and logos) look horrible.

However, looking at the php file, it appears that it is attempting to use quality 86. If this was the case, images wouldn't look so horrible. So I wonder if there is a problem with my GD setup... Does anyone have any ideas to troubleshoot this?

If someone else can help, please contribute! Thanks :)

Link to comment
Share on other sites

That link you sent doesn't really explain anything, it just shows different quality levels. DPI and PPI aren't relevant to this either. And what do you mean by "gigo"? Garbage In Garbage Out? As I mentioned, these images are good quality to begin with (uncompressed PNG24)

Link to comment
Share on other sites

Here is an example. I have saved the original logo with the JPEG quality setting to 90, then to 30, and increased the image size in comparison to the original, to more easily see any differences.

As you can see, quality 90 and quality 30 are identical. So somewhere along the way, the value in the php file is being overridden by GD.

Does anyone have any ideas on what is causing this?

(make sure to click on the thumbnail below, and click "Zoom" to see the full size)

4635_JklY4l9egvaf2hMPlKaN_t

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

Me too - everything is working perfectly, except image compression, even the logo and home page image look pixelated, and for some reason prestashop has enlarged them (though I have added them directly through ftp they still look less than clean).

This is quite an issue when designing for the shop. Is there no way to get an exact representation of the image created in photoshop without the compression (which is compressed far better in photoshop anyway).

Link to comment
Share on other sites

  • 1 month later...

same here and it's driving me nuts. can someone from prestashop address this issue? if you take a look at the properties of a page on my prestashop you "Image Dimensions: 300px × 300px (scaled to 400px × 400px). this seems odd and perhaps is a clue to where this is coming from. the image quality can't stay this low. lowlight posted this question 9 months and no one has come up with a good reponse?

Link to comment
Share on other sites

If you changed the "large" size from 300 x 300 to 400 x 400 under Images > Preferences, you must modify css/global.css in your theme's directory and change the following code:

#primary_block #pb-right-column{
   width:310px;
   float:left;
}
#primary_block #image-block{
   border:1px solid #d6d6d6;
   height:302px;
   width:300px;
}
#primary_block #image-block img#bigpic{ 
   cursor:pointer; 
   height:300px;
   width:300px;
}



to:

#primary_block #pb-right-column{
   width:410px;
   float:left;
}
#primary_block #image-block{
   border:1px solid #d6d6d6;
   height:402px;
   width:400px;
}
#primary_block #image-block img#bigpic{ 
   cursor:pointer; 
   height:400px;
   width:400px;
}


Alternatively, you can just change the "large" size back to 300 x 300, then "Regenerate thumbnails".

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...