def METHOD_NAME(value):
    valid_formats = [
        "image/jpeg",
        "image/x-citrix-jpeg",
        "image/png",
        "image/x-citrix-png",
        "image/x-png",
    ]
    if hasattr(value.file, "content_type"):
        if value.file.content_type not in valid_formats:
            raise ValidationError(_("File not supported."))