#4 Added check for any image type

All image types should be handled in this particular code block.