fix when selecting images from the dom without a height or width