Sign in

Image resizing makes files larger

  • This topic has 2 replies, 2 voices, and was last updated 3 days, 9 hours ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6425
    masonbee

    Publii: v.0.38.3 (build 14238)

    Ubuntu 20.04

    Featured image on this page is( https://masonbee.nz/media/posts/612/responsive/Fedora-34-screenshot-2xl.png) is 958.7kB. I thought I had made a mistake so I ran it through tinypng and downsized it to 253.7 kB then removed the original featured image and used the tinypng one. But when I preview the image it is back to 958.7kB….I have cleared my cache but I think it might be a bug. The original image had been resized to 1024×758 so it wasn’t 958.7kB to start with. It appears publii is making the filesize bigger? Should I only use jpg?

    #6428
    masonbee

    I have since changed the image format to jpg and it works fine. Additionally, looking back I have other images in png format which appear to have been resized without a problem. The image in question was done on Fedora 34 so it is possible there was a problem with a dependency. The argument against that would be that I recreated the issue under Ubuntu 20.04.

    #6436
    privii

    I had similar experiences. It seems whatever compression they use is fast but not as good as TinyPNG or pinga.

    This is a workaround, not a fix, but it works:

    • Upload your image and let Publii resize it.
    • Find your resized files (e.g. `C:\Users\whatever\Documents\Publii\sites\whatever\input\media\posts\1\responsive` )
    • Optimize those resized files instead of the original.

    As long as you don’t upload a new image, Publii won’t regenerate the responsive ones.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.