andismith / grunt-responsive-images

Produce images at different sizes for responsive websites.
http://www.andismith.com/grunt-responsive-images/
MIT License
719 stars 96 forks source link

Image increasing in byte size even when the dimensions are smaller. #103

Closed tommaton closed 7 years ago

tommaton commented 8 years ago

I've got an original png image at the following dimension - 1920 × 1080 at 12kb.

The options in my grunt config are:

    options: {
                sizes: [{
                    name: "xsmall",
                    width: 160,
                    quality: 80
                },{
                    name: "small",
                    width: 320,
                    quality: 80
                },{
                    name: "medium",
                    width: 640,
                    quality: 80
                },{
                    name: "large",
                    width: 1024,
                    quality: 80
                },{
                    name: "xlarge",
                    width: 1600,
                    quality: 80
                }],
                upscale: false,
                createNoScaledImage: true
            }

Every time run the grunt task some of the images seem to get larger in bytes even though they're smaller in size. image-xsmall - 2kb (smaller) image-small - 3kb (smaller) image-medium - 8kb (smaller) image-large - 15kb (larger) image-xlarge - 30kb (twice as large!!)

andismith commented 8 years ago

Could you supply the original image please Tom? Are you using Imagemagik or Graphicsmagik? What happens if you run the image through ImageOptim afterwards?

andismith commented 7 years ago

Closing due to lack of response.