check image extension