View Single Post
  #3  
Old 07-08-2016, 09:27 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Images - XC5 control of them...

Quote:
Originally Posted by qualiteam
I doubt that resized images will be progressive jpegs
Thank you. That's very clear and perhaps the most important answer for everyone to know Perhaps this could be an XC5.3 suggested update?
Quote:
Originally Posted by qualiteam
/var/images directory is used to cache resized images. For example, if X-Cart knows that the active theme displays product images at X*Y, A*B and M*N dimensions, it will resize every uploaded image to these dimensions and store them for future use. Sometimes this happens not at the time when an image is uploaded, but at the time it is displayed in that particular width and height the first time
Again thanks for making this clear. If a re-sized image stored here, has a date over 12 months old, but the connected main image has been re-worked several times since it's original upload date, then we are assuming that this particular image (i.e. in this specific size) has never been requested by any site visitor? Otherwise it would be overwritten 'on demand' as a result of a verification check? Is that correct?

If not, then presumably the verification check used 'on demand' is only filename related and not file creation date / file creation time / file creation size related too, which would be far more effective Therefore, one more question on this matter: If ALL the images stored in /var/images are manually deleted (we mean all the images and their subdirectories too) and then "Generate resized images" located on the images page within Look and Feel is run again afterwards, it should successfully re-create them all, but they will now all be current and correct, albeit not progressive jpegs? This deletion / replacement process won't result in any X_Cart System errors either? We don't think it should, but...
Quote:
Originally Posted by qualiteam
Do you have ImageMagick installed on the server?
Yes we do
Quote:
Originally Posted by qualiteam
I'm not sure if there is a solution for the GD library for PHP, but I think it can be done for ImageMagick (with a minor tweak) as is described here. So, you are to do the following: 1. Install ImageMagick on the server 2. Edit etc/config.php and specify your image_magick_path 3. From a custom module decorate the "execResize()" method in \XLite\Core\ImageOperator\ImageMagic class so that it calls the imagemagick binary with the extra "-interlace Plane" parameter. Does this help?
Yes this is very helpful thank you, but we think we will save the effort needed to create a new module until we switch to XC5.3 later this year as a) It may not be required (if this becomes an XC5.3 CORE inclusion ) b) It will be far easier to create a new module in XC5.3 than trying to convert an XC5.2 module (you know this better than we do!).
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote