New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ImgBot] optimizes images #6519

Merged
merged 3 commits into from Nov 10, 2017

Conversation

Projects
None yet
7 participants
@ImgBotApp
Copy link
Contributor

ImgBotApp commented Nov 5, 2017

Hey there. I've just optimized all of your images. They are the same dimensions and quality as before, only they take up less space now.

*Total: 156.87kb -> 131.07kb (16.45%)

\docs\img\jekyll-sticker.jpg -- 114.17kb -> 111.83kb (2.05%)
\docs\img\jekylllayoutconcept.png -- 39.27kb -> 18.86kb (51.97%)
\test\fixtures\test-theme\assets\img\logo.png -- 3.43kb -> 0.38kb (89.04%)

[ImgBot] optimizes images
*Total: 156.87kb -> 131.07kb (16.45%)

\docs\img\jekyll-sticker.jpg -- 114.17kb -> 111.83kb (2.05%)
\docs\img\jekylllayoutconcept.png -- 39.27kb -> 18.86kb (51.97%)
\test\fixtures\test-theme\assets\img\logo.png -- 3.43kb -> 0.38kb (89.04%)
@DirtyF

DirtyF approved these changes Nov 5, 2017

@DirtyF DirtyF added the site label Nov 5, 2017

@pathawks

This comment has been minimized.

Copy link
Member

pathawks commented Nov 6, 2017

Could somebody review this to make sure the images are actually the same quality as before? Need to make sure no color profiles have been lost or anything.

I am inclined to keep docs\img\jekyll-sticker.jpg as is, since the savings is so small, and JPEG recompression can be lossy, and there are no details given in this PR about the process used to compress the images.

@pathawks

This comment has been minimized.

Copy link
Member

pathawks commented Nov 6, 2017

@dabutvin

This comment has been minimized.

Copy link

dabutvin commented Nov 6, 2017

@pathawks ImgBot uses Imagemagick to optimize images through the LosslessCompress() routine from the The .NET wrapper Magick.NET.

That image in dabutvin/ImgBot#26 is the only case I've seen so far of any color issue like that and I've just opened an issue with ImageMagick to see if we can track down why.
dlemstra/Magick.NET#124

I understand you may want to keep some images from being optimized. This is why ImgBot offers an ignore option

// .imgbotconfig
{
    "ignoredFiles": [
        "jekyll-sticker.jpg"
    ]
}

see https://github.com/dabutvin/imgbot#configuration

@dabutvin

This comment has been minimized.

Copy link

dabutvin commented Nov 8, 2017

FYI
There has been some progress on the the jpeg issue
dlemstra/Magick.NET#124

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 10, 2017

This is so cool!!!!! Folks on high latency & low bandwidth connections are going to love this. We could optimize more (like our fonts being custom slowing things down & so on) but this represents a big reduction in bandwidth that’s a huge win for the average visitor 😄

@DirtyF

This comment has been minimized.

Copy link
Member

DirtyF commented Nov 10, 2017

@jekyllbot: merge +site

I'll replace the sticker image with a lighter one.

@jekyllbot jekyllbot merged commit fd271f5 into jekyll:master Nov 10, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

jekyllbot added a commit that referenced this pull request Nov 10, 2017

@pathawks

This comment has been minimized.

Copy link
Member

pathawks commented Nov 10, 2017

Did somebody check to make sure the images are actually lossless?

@envygeeks

This comment has been minimized.

Copy link
Contributor

envygeeks commented Nov 10, 2017

There is no way you can achieve an 89.4% reduction in size on lossless compression unless that image had so much metadata and junk from it's image writer that stripping that reduced the size significantly.

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 10, 2017

They were generated with Adobe software, so it’s always possible there was that much bloat 😂

@dabutvin

This comment has been minimized.

Copy link

dabutvin commented Nov 13, 2017

FYI ImageMagick.NET released a fix for the missing color profile in the JPEG Optimizer that is running in ImgBot now.

see dlemstra/Magick.NET@1725159

@pathawks

This comment has been minimized.

Copy link
Member

pathawks commented Nov 13, 2017

The biggest thing that worries me is the difference between Lossless and anything in the category of “perceptually lossless.”

Just trying a thousand iterations of Gzip compression is cool, but once the actual image data is being changed it seems that a reviewer needs to inspect the image carefully in different browsers and devices.

But clearly I’m alone in this, so I’m probably just being paranoid.

@dabutvin

This comment has been minimized.

Copy link

dabutvin commented Nov 13, 2017

@pathawks you're not alone :) we had a very similar conversation over here about the same thing dlemstra/Magick.NET#124 (comment)

Perceptually lossless vs actually lossless.

For the most general scenario of releasing something like a website i think perceptually lossless is all that matters and is actually ideal.

That being said, because images cut across so many different mediums and concepts in software, there is likely a segment where this would be an important distinction and offering options and configuration is going to be important in these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment