News for hackers. Stuff that matters.
Re:Responsive images by chiefalchemist on Saturday June 12, 2021 @08:14AM (#27483922)
That's I believe that's incorrect. WP won't "crop up", unless you're using some special plugin.

In fact, for example, if you have 3 images sizes registered, say 100px wide, 500px wide, and 1000px wide, and you upload an image 800px wide, native WP will not produce the 1000px wide image. It can't. It will only resize / crop down. It won't take an image an stretch it.

Re:Responsive images by SquareWheel on Saturday June 12, 2021 @11:04AM (#27484954)
I believe what they're saying is that the thumbnails Wordpress generates may be larger in file size because they're not rigorously optimized like your original image may be.

There's browser plugins that will loop through your entire media library and ensure they're optimized. TinyPNG and Smush are well-known ones.

Re:Responsive images by topicseed on Saturday June 12, 2021 @03:08PM (#27486750)
Yes, that's exactly what I meant. I optimise my uploaded images highly and when WP created the various sizes, the smaller pixel sizes often end up heavier in kb than the original.

So I have to optimise them all, now it is done automatically.

Re:Responsive images by chiefalchemist on Saturday June 12, 2021 @11:54AM (#27485281)
I'd like to see that. That would mean either WP is adding meta to the image file (which I'm pretty sure it doesn't do), or WP is making a lower quality jpg in higher which - without a special AI-y algorithm - isn't going to yield true higher res.
Re:Responsive images by onli on Saturday June 12, 2021 @12:14PM (#27485420)
I have definitely seen that happen with the PHP blog engine that runs my blog, either with the GD image functions or with the imagemagick integration. Probably something like: Take an optimized image, like an indexed png, load it as raw image data, scale it down, save it in the same format but not optimized. The Wordpress code looks similar.
Re:Responsive images by superfad on Saturday June 12, 2021 @12:49PM (#27485660)
I've had this happen when uploading a highly optimized image (manually optimized with Squoosh) 2560px wide, then WP generating a 1920px wide version and the KB was larger. I believe I was using the free version of Smush at the time and had to change. Now using reSmush.it.