Patch oembed to respect file dimensions

From #3313.