improve oembed generation (check image type)