handling for image type and image size but both are not working simulatneouly image type will be given priority