Themes: Ensure the image returns a width before checking that it is less than 300px.

see #26459.


git-svn-id: https://develop.svn.wordpress.org/trunk@26765 602fd350-edb4-49c9-b593-d223f7449a82