News:

Support the VirtueMart project and become a member

Main Menu

Thumbnail Quality

Started by juanvilchez, December 28, 2017, 23:00:35 PM

Previous topic - Next topic

juanvilchez

I've searched the forum, and the topic has been treated dozens of times.

It seems that the algorithm used to generate the thumbnails from the images is uncapable of creating clean, sharp images. Probably it wasn't a very big issue some years ago, but now it's very noticeable considering nowadays mobile phone and computer screen standards (ultra high resolutions don't mix up well with JPEG artifacts!).

I've tried modifying the quality settings as stated in previous posts (in administrator/components/com_virtuemart/helpers/img2thumb.php --- return imagejpeg($new_img, $fileout, 100); ), but the difference was not noticeable at all, but the file size was nonetheless increased.

In those treads, it is proposed batch generation using Irfanview and other image editors but let's face it: it's rather unpractical! VM should provide a comprehensive all-in-one solution.

What is more important than making our stores and products look right?
VM 3.8.8 (10472)
Joomla 3.10.9
PHP 7.3.25

GJC Web Design

do you know of a commonly available image library other than php GD?

the only alt. I know is Imagick (seems to be considered better) but afaik it is not widely available on hosts

Any solution has to be available on all common hosts
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Quote from: juanvilchez on December 28, 2017, 23:00:35 PM
VM should provide a comprehensive all-in-one solution.

VM is a community project so if you have a solution for your perceived issue which is suitable for use on all types of server platform then please feel free to submit it.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

#3
If you need high quality image, use PNG and  not jpg, of course in this case your image are bigger but you get better image quality.
Note that i added a webp convert in Vm Be Pro and a punyPng button to get best PNG compression.
You can check here about webp  : https://www.andrewmunsell.com/blog/png-vs-webp/
Note that my website image is not optimised for image quality, i prefer in my case faster render.
Here to compare sizes :
child-pro-phone_600x600.png   157 659
child-pro-phone_600x600.webp   12 750
vmproducts_samples.jpg   260 228 (quality 70% i think)
vmproducts_samples.webp   214 590
To use webp, you can use a simple rule in the .htaccess
# use webp
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]

Webp is not supported by all browser, but with this rule, it autoswitch by browser