Just as for File Upload fields, Image Upload fields are equally prone to hack attempts. They also have additional functionality to do post-upload, such as passing the image through various image processing filters / presets. While testing Image Upload Fields, you have to take into consideration all these points. Here are some test cases to help you test image upload fields on a Drupal site:
- Ensure that a warning message like "The selected image cannot be uploaded. Only images with the extensions given in the help text are allowed" is displayed when we try to upload an image of format that is not supported.
- Ensure that proper error message is thrown while trying to upload image of size lesser than the minimum limit and greater than the max limit specified.
- Ensure that images of correct extension and size can be uploaded to the site.
- Ensure that user can edit/delete the uploaded image.
- Ensure that the image file viewed is the same as the one uploaded.
- Ensure that the uploaded image is not cropped off.
- If client requirement is to set all images to a specific height_width format then ensure that the uploaded image is getting resized to that width, cropping/scaling as per required.
These are the most important cases to be considered while testing Image Upload fields. Do let me know through the comments box below if you would have something more to add to this list. If you want us to test your Drupal site let us know as well.
Hope this article helps. Happy testing!