Fixed usage of extensions for images.