As we know, if we specify width
and height
attributes in <img />
element, browser can immidiately locate image in rendered layout. It's not a really big boost of speed, but it's really nice optimisation practice.
Ok, but sometimes image has different dimensions. So we can get it by PHP getimagesize()
function.
And here is the question, if we don't have specific dimensions is it worthwhile to use PHP? Of course, we have to write additional code, but if we cope with gallery we anyhow use PHP, so in that case it's only 2 lines of code.
What is your opinion?