Added validation for image type in listing.rb