WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Why it convert 8-bit PNG to 24-bit PNG? (6 posts)

  1. DragonSigh
    Member
    Posted 1 year ago #

    So there is a question. I'm trying to upload 8-bit png (that just 172 kb with resolution 680 x 2974) and when EWWW generates thumbnails (with optipng) it converts images to 32-bit colors and now just thumbnails, one for example, 624 x 2729 takes 1,4Mb. Should I try pngout instead or it is the same?

    U'm also getting this error with this file (680 x 2974? png, 8-bit):

    Unsupported file type
    Metadata is missing file path.

    (but as i can see it uploaded succefully at FTP)

    http://wordpress.org/extend/plugins/ewww-image-optimizer/

  2. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    can you send me a link to the file in question?

  3. DragonSigh
    Member
    Posted 1 year ago #

    Of course, check it, please:

    http://dsigh.ru/wp-content/uploads/2013/01/wordpress-vs-joomla-2013-infographic-ru.png

    (i've disabled ewww while uploading)

  4. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    After uploading it to my server, I've verified what I suspected. The fault is not with the plugin, it is actually native to wordpress (the GD library used to generate thumbs more precisely). I believe it has difficulty with 8-bit PNGS, usually that is in relation to transparency, but perhaps the difficulty is that wordpress never bothers to check if a PNG is 8-bit, and just mangles all the thumbs to 24-bit regardless.

    Unfortunately, it doesn't appear that either optipng or pngout attempt to downsize them back to 8-bit, so you'll want to see if you can find some utility to take care of that for you. pngout is able to save some extra space if you crank it to the lowest setting, but unless you're on a dedicated server, I would avoid that. optipng only manages to scrape off 2 bytes at max settings, so that's not worth much. Both of them fully support 8-bit PNGs in my testing, so that fully confirms that the blame lies with the GD library that does the resizing.

    I'll take a look at the ftp uploading issue here in a bit.

  5. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    ok, I think I misunderstood your other issue. Is it the same file that gives you the 'unsupported file type' message?

    My suspicion is that while the EWWW IO plugin is enabled, the png optimization takes so long (because of that massive 1.4 MB PNG resize that wordpress creates), that some of the metadata is corrupted or not generated when you upload it. The file could very easily be uploaded, and show up via your FTP, but not properly registered in the database, since the optimization is done during the metadata generation process. There's not really any way around that, sorry.

  6. DragonSigh
    Member
    Posted 1 year ago #

    Thanks for your attention, nosilver4u. Yes this is the same file. So I need to optimize it manually, of course it's pity, but anyway thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic