ddur
Forum Replies Created
-
There are two kinds of image colorspace metadata:
‘colorspace’
‘icc’ profile.If colorspace is empty, plugin does not convert to another (sRGB) colorspace, because has nothing to start with. Although, empty colorspace may be interpreted by ImageMagick library as sRGB, which makes your image interesting to use as special test case image.
Instead converting all generated thumbnails via FTP, you have couple of much simpler choices:
1) Disable colorspace conversion and you may upload any colorspace image. If colorspace is not sRGB, ‘icc’ profile won’t be removed, regardless of “strip-metadata” setting.
2) Disable colorspace conversion, properly convert original to sRGB, and upload. If colorspace is sRGB, attached ‘icc’ profile will be removed, but only if “strip-metadata” setting is set to “Strip All”.
Thanks.
Possible. Thanks.
Thanks. Can you share that original image?
Hi, thanks for asking.
Only thumbnails/sizes are converted to sRGB. Uploaded original remains “original” (unchanged). Same as in original WordPress code.
Anyways, in next version, JPEG original will be cloned to same size, converted to sRGB and compressed. Soon.
Thanks again for the support and a very nice plugin!
You are welcome to write a 5 stars review here. 🙂
https://wordpress.org/support/plugin/warp-imagick/reviews/#new-post4) ANOTHER TIP
Once you have libjpeg-turbo installed, you may replace it with MozJpeg (https://mozjpeg.com/). With MozJpeg installed, maybe you do not need WebP at all?
https://blog.avirtualhome.com/replace-jpeg-libraries-with-mozjpeg/
4) If you follow (Debian 10) package dependencies,
at the end you will find libjpeg-turbo:ImageMagick
https://packages.debian.org/buster/imagemagick
https://packages.debian.org/buster/imagemagick-6.q16
https://packages.debian.org/buster/libmagickcore-6.q16-6
https://packages.debian.org/buster/libjpeg62-turboPHP-imagick
https://packages.debian.org/buster/php-imagick
https://packages.debian.org/buster/libmagickcore-6.q16-6
https://packages.debian.org/buster/libjpeg62-turbo2) Currently I have another priorities to develop, but this may be eventually implemented.
4) In Warp iMagick, WebP files are generated from thumbnails and from original (quality) upload.
1) Colorspaces and ICC profiles are not the same thing.
https://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses
https://en.wikipedia.org/wiki/ICC_profile
ICC profiles are another standard, kind of “bridge for colors” when converting colors to another colorspace or to device (screen/printer). AFAIK, browsers do not need ICC profiles (or they have them internally built in) for internet standard sRGB colorspace. So, sRGB JPEG metadata may be completely removed.
WebP format does support (EXIF) metadata (including ICC) but I’m not aware of PHP tool/library that is able to write metadata into WebP. Anyways that would be beyond the intended scope of this plugin.
4) Warp-iMagic converts JPEG to WebP in same way as ‘cwebp’ program does, file to file, “so double compression (not good)”.
1) Depends on few things
– If you look for profiles in the webp enabled browser, and .htaccess redirects jpeg to webp, all images will acctualy be webp (no metadata). Regardless of image extension (.jpg vs jpg.webp)
– If image is converted to sRGB from other colorspace, ‘icc’ profile should be removed from thumbnails, if not already
– Another plugin may set ‘image_strip_meta’ filter to true/false.
– If original image does not contain icc profile, ‘Do Not Strip At All’ can’t help.Warp-iMagick doesn’t add icc profile to images converted to sRGB.
Warp-iMagick only removes icc profiles when instructed to do so, or icc profile has to be removed due conversion from another colorspace to sRGB.AFAIK, sRGB images on the web do not need icc profile at all,
JPEG images without icc profiles are by default considered as having sRGB icc profile.https://www.w3.org/Graphics/Color/sRGB.html
https://www.w3.org/TR/css-color-3/#SRGB
https://webstore.iec.ch/publication/61682) Yes. Sharpening may be be implemented in some future version.
3) Yes.
4) No. That is not currently implemented because iMagick in most OS distributions I tested, is not, by default, compiled with WebP libraries. PHP-GD is used to convert from JPEG file to WebP file.
5) Configure Warp-iMagick to highest compression quality (85%). Next version may allow up to 95-100%.
6) There are plenty of image plugins on WP repository. I can’t know them all and all of your needs.
Tip: In Debian 10/PHP7.4.9, imagemagick-core is linked to libjpeg-turbo library. File compression using libjpeg-turbo is almost as good as WebP.
To stop generating any image-sizes (thumbnails) on upload:
add_filter( ‘intermediate_image_sizes_advanced’, function( $sizes ) { return array (); }, -999 );OR
To remove all WordPress & theme image sizes (thumbnails) everywhere, including stop generating any image-sizes (thumbnails):
add_filter( 'intermediate_image_sizes', function () { return array (); // Remove WordPress sizes. }); add_action( 'init', function () { global $_wp_additional_image_sizes; $_wp_additional_image_sizes = array(); // Remove theme sizes. });Attention/Disclaimer:
1) I didn’t test/try the code above, it may produce fatal error.
2) I do not know how WP & Theme will behave without defined sizes or missing thumbnails.
3) Code above will not remove already generated (existing) sizes (thumbnail-files).
4) You may try this, but you are on your own.
5) Code may work with & without Warp-iMagick.
6) Code may or may not work with other image compression/optimization plugins.Thanks!
Yes, original images are not compressed.
That is to enable regenerate thumbnails from original,
again and again, without loosing quality for each regenerate.Next release (v 1.3.13) will back up the original and compress original to same full-size.
Version 1.3.13 is in testing, right now. 😉
Where/how do you block thumbnail sizes?
Actually Warp-iMagick does create webp clones for all image sizes, including original.
Maybe you have tried first/old version.
Thank you.
- This reply was modified 5 years, 4 months ago by ddur.