What was your CLI ommand and response?
See examples in the link below
https://developer.wordpress.org/cli/commands/media/regenerate/
Nothing but the usual. It didn’t correct the colour profile though.
Did you compare thumbnail-image file-sizes before and after?
Are you talking about original image color profile or thumbnail image color profile?
@mattiasf
Thank you for your questions!
the main image has CMYK and should be sRGB. CMYK doesn’t work well with WordPress
I ran a shell script on my server and converted all CMYK images to sRGB then rebuilt thumbnail it worked
Would be cool if your plugin could do this for me automatically
@mattiasf
1) Main (original/upload) image is never touched or converted or compressed as it must be preserved to serve as best possible source for media edit screen.
2) sRGB is web standard that browsers use for images without color profile. So use default “Color space: sRGB” (which is supposed to convert all thumbnail image color spaces to sRGB) and default “Strip metadata: Strip All Metadata” (which will remove original Color Profile from thumbnails).
@mattiasf
1/B) Second, and most important reason why main (original/upload) image must be preserved is to enable regenerating thumbnails. As many times we want, from same original image, without quality loss each time.
CMYK is not meant for web. It’s perfectly fine to convert the main image to sRGB. It won’t loose quality. Many plugins already do this.
So it would be great if your plugin also did this
wp media regenerate
regenerates the thumbnails for me, but the plugin settings have no effect on that.
I tried to set the jpg quality settings to both 85% and 30% and regenerate the thumbnails, but the file size did not change – and webp thumbnails are not generated.
Normal image upload works and the plugin dies generate webp versions reliably.
While writing this comment: I only installed the GD libraries in my wordpress image, but not in the wp-cli image. i guess this could explain something? I’ll try 🙂
With the media regenerate plugin, it actually works. But your plugin prints:
NOTICE: PHP message: PHP Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/wp-content/plugins/warp-imagick/classes/class-plugin.php on line 573