Este sitio web utiliza cookies para realizar análisis y mediciones de tus visitas. [ Acepto ] [ Más información aquí ].

How to Massively Optimize Images in PageSpeed

PageSpeed is a good tool for optimizing images, since it comprises them to better levels than Photoshop. Its limitation is that it forces to navigate "page by page" to perform individual compressions. However, if you wish to optimize hundreds of images massively in less time, there's a semiautomatic solution:

1. Open MS-DOS (All Programs > Accessories > Command Prompt)

2. Go to the folder where all the images are stored:

cd C:\danielpinero\images

3. Run the following command:

dir /b /s *.gif *.png *.jpg > images.html

4. With that previous command, you've just created a file inside folder \images (or any folder you've selected) with the name images.html.

5. Open it, and using "Search and replace", change:

C:\danielpinero\images BY <img src=\"

.gif BY .gif">

.png BY .png">

.jpg BY .jpg">

.jpeg BY .jpeg">

6. Upload images.html to your website and open it. It will be a collage of all your images:

7. Open PageSpeed > Optimize images > Save as. Go picture by picture, saving them and replacing the old files in your hard drive.

Añadir comentario

Comentarios

2014-11-29 - anonymous

Use linux and be done with it in 5min