copy width and height to avoid reflow

This will copy the width and height attributes from the span to the image element, this is needed to avoid reflows will loading the page