imagemagick and google page speed
imagemagick and google page speed
hi,
suddnely the google page speed tool give me a warings about the compression of my resize images :
"Compressing http: ...ganim.jpg could save 8.4KiB (22% reduction)."
im using imagemagick node with the following options:
{srcPath: file,
format: self._setFormat(),
width: self.options.width,
height: self.options.height + prefix,
strip: true,
interlace: "none",
colorspace: "sRGB",
dither: "none",
quality: 0.75
customArgs: [
'-define', 'jpeg:fancy-upsampling=off',
'-filter', 'Triangle',
'-define', 'filter:support=2',
'-dither', 'None',
'-gravity', 'center',
'-unsharp', '0.25x0.25+8+0.065',
'-interlace', 'none',
'-colorspace', 'sRGB',
'-crop', self.options.width + 'x' + self.options.height + '+0+0',
'+repage'
]
}
Does anyone know how to fix it?
suddnely the google page speed tool give me a warings about the compression of my resize images :
"Compressing http: ...ganim.jpg could save 8.4KiB (22% reduction)."
im using imagemagick node with the following options:
{srcPath: file,
format: self._setFormat(),
width: self.options.width,
height: self.options.height + prefix,
strip: true,
interlace: "none",
colorspace: "sRGB",
dither: "none",
quality: 0.75
customArgs: [
'-define', 'jpeg:fancy-upsampling=off',
'-filter', 'Triangle',
'-define', 'filter:support=2',
'-dither', 'None',
'-gravity', 'center',
'-unsharp', '0.25x0.25+8+0.065',
'-interlace', 'none',
'-colorspace', 'sRGB',
'-crop', self.options.width + 'x' + self.options.height + '+0+0',
'+repage'
]
}
Does anyone know how to fix it?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: imagemagick and google page speed
Lowering the quality will increase the compression. However, it will also decrease the quality (make the result more different to the original). I don't know if the google page speed tool cares about quality.
snibgo's IM pages: im.snibgo.com
Re: imagemagick and google page speed
i already lowered the quality(0.75) and google still yelling at me!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: imagemagick and google page speed
Is this a google web page? Do you have a URL?
snibgo's IM pages: im.snibgo.com
Re: imagemagick and google page speed
You do not need to do what Google tell you; it is your choice. If you are only going to reduce one image by 8.4KiB I would have thought it would make very little difference to load time.
I thought jpg quality was in the range of 1-100.
I thought jpg quality was in the range of 1-100.
Re: imagemagick and google page speed
its about the google page speed score...
the range can be alos 0-1 at least in node imagemagick
the range can be alos 0-1 at least in node imagemagick
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: imagemagick and google page speed
JPEGs can always be compressed, if the goal is merely to accelerate download speeds. Here's a 267x233 image I often use, compressed with "-quality 1", a mere 828 bytes:
The quality is totally horrible. It has an RMSE difference of 7.5% from the original. For ordinary photos like this, I accept an RMSE difference of 1%.
The quality is totally horrible. It has an RMSE difference of 7.5% from the original. For ordinary photos like this, I accept an RMSE difference of 1%.
snibgo's IM pages: im.snibgo.com
Re: imagemagick and google page speed
I have also noticed that google page speed has changed. It used to only do lossless compression. What you could try is setting the sampling factor. I think you should do it like this:
Code: Select all
customArgs: [
'-define', 'jpeg:fancy-upsampling=off',
'-define', 'jpeg:sampling-factor=2x2,1x1,1x1',
Re: imagemagick and google page speed
thanks dlemstra,
it's improve the results but it's not perfect like it was before google changes.
any suggestions?
it's improve the results but it's not perfect like it was before google changes.
any suggestions?
Re: imagemagick and google page speed
You should compare the image with the results from google. There is a download option somewhere on that page. When you compare them with your own images you will see that they are the same.