added validation for image urls