Add condition that makes sure images objects are only being created when an image file is attatched to a submission.