Website Optimization - Adding Images

Iโ€™m optimizing my site in accordance with Googleโ€™s website optimization standards:

http://code.google.com/speed/page-sp...mageDimensions

For those who are familiar with this, I use Firebug โ†’ "Page Speed" to analyze the weak areas of the site.

About the link above, image size, the question is that I have a lot of dynamic images on my site that are downloaded via CMS and therefore change in height / width. Therefore, how important is it to specify image sizes? If 5-10 images from the CMS were written on the page, which option is below:

a) Do not specify image sizes
b) Use the getimagesize PHP function to dynamically measure the image size and put it in the IMG tag as "width" and "height"
c) Update our database to keep the image width / height (I am already requesting other information from the image table in my database, for example the text for the attribute "alt"), and then refer to these columns for the IMG tag front end?

I think c is the best option, but I would like to hear if anyone has any recommendations or statistics on which option is better. Obviously, "c" means that we need to request more data from the database.

We also use a separate database server and use browser caching. (Http://code.google.com/speed/page-speed/docs/caching.html)

thank

+5
source share
2 answers

c

  • Adjusting the image size will give you better page loading behavior.

    If you have not set the size of the part of the page will resize the page loaded, and it is just plain ugly.

  • If you are already querying your database for text text, I doubt you will notice any performance issues if you load two more columns.
+3
source

B , . , C. CMS, , , cron ,

+2

All Articles