Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a scaled image and how do I serve one in a webpage?

Tags:

html

css

Whan I run a test page in google PageSpeed. I found a few warnings like for example serve scaled images..

 http://man-vimal.net78.net/introduction/?intro/action=main

THe results were as such :
The following images are resized in HTML or CSS. Serving scaled images could save 449.3KiB (99% reduction).
http://man-vimal.net78.net/.../twitter-logo.png is resized in HTML or CSS from 367x367 to 20x20. Serving a scaled image could save 140.9KiB (99% reduction).
http://man-vimal.net78.net/introduction/views/images/fb.png is resized in HTML or CSS from 1,692x1,692 to 20x20. Serving a scaled image could save 115.9KiB (99% reduction).
http://man-vimal.net78.net/.../linkedin.jpg is resized in HTML or CSS from 1,024x768 to 20x20. Serving a scaled image could save 99.6KiB (99% reduction).
http://man-vimal.net78.net/.../panorama.jpg is resized in HTML or CSS from 604x453 to 100x100. Serving a scaled image could save 81KiB (96% reduction).
http://man-vimal.net78.net/.../googleplus.jpg is resized in HTML or CSS from 450x320 to 20x20. Serving a scaled image could save 12KiB (99% reduction).

What is a scaled image and how can I fix this up ??

like image 755
Manish Basdeo Avatar asked Jan 19 '13 07:01

Manish Basdeo


People also ask

What is a scaled image?

A scaled image is essentially one that has been sized to fit the exact dimensions you're using it for. On one hand, an image that's too small and scaled up will be blurry. On the other hand, while a browser will shrink an image that is too large, it adds to the page's file size unnecessarily.

What is a scaled image in WordPress?

One of the best ways to improve a WordPress site performance is by serving scaled images. This means resizing the site images to fit the exact dimensions of the area where they are placed.

How do you scale an image in HTML?

If your image doesn't fit the layout, you can resize it in the HTML. One of the simplest ways to resize an image in the HTML is using the height and width attributes on the img tag. These values specify the height and width of the image element. The values are set in px i.e. CSS pixels.

Why is WordPress scaling my images?

Put simply, WordPress automatically resizes images to help you save bandwidth and prevent you from having to manually resize images. For example, the image size you would use for a post thumbnail is much different than what you would use for an image slider on your home page.


2 Answers

A scaled image is an image that has been scaled to match the size that it is displayed.

http://man-vimal.net78.net/.../twitter-logo.png is resized in HTML or CSS from 367x367 to 20x20. Serving a scaled image could save 140.9KiB (99% reduction).

This is telling you that the your source image is 367x367 but you are displaying it at 20x20.

It is inefficient because the browser has to download the larger image and then rescale it. The 367x367 image is 140kb larger than a 20x20 image would be.

To fix this, resize the image (in photoshop, preview, etc. ) so that is 20x20 and serve that one instead of the image you are currently serving.

like image 141
PassKit Avatar answered Sep 23 '22 11:09

PassKit


your images are too big. just resize them. you can even use paint to do that. a scaled image is basically a resized image.

like image 33
Rachel Gallen Avatar answered Sep 20 '22 11:09

Rachel Gallen