add media type check for visibility of images