diff --git a/ckanext/datavic_odp_theme/helpers.py b/ckanext/datavic_odp_theme/helpers.py index 4a863aa..fb9e36d 100644 --- a/ckanext/datavic_odp_theme/helpers.py +++ b/ckanext/datavic_odp_theme/helpers.py @@ -256,7 +256,7 @@ def datavic_update_org_error_dict( error_dict["Logo"] = [( "Image format is not supported. " "Select an image in one of the following formats: " - "JPG, JPEG, GIF, PNG, BMP, SVG." + "JPG, JPEG, GIF, PNG, WEBP." )] return error_dict diff --git a/ckanext/datavic_odp_theme/logic/validators.py b/ckanext/datavic_odp_theme/logic/validators.py index 8487513..efed93e 100644 --- a/ckanext/datavic_odp_theme/logic/validators.py +++ b/ckanext/datavic_odp_theme/logic/validators.py @@ -40,14 +40,14 @@ def datavic_organization_upload(key, data, errors, context): ( "Image format is not supported. " "Select an image in one of the following formats: " - "JPG, JPEG, GIF, PNG, BMP, SVG." + "JPG, JPEG, GIF, PNG, WEBP." ) ) def _is_valid_image_extension(mimetype: str) -> bool: """Check if the mimetype corresponds to a valid image extension.""" - valid_extensions = ["jpg", "png", "jpeg", "gif", "bmp", "svg"] + valid_extensions = ["jpg", "png", "jpeg", "gif", "webp"] extension = mimetypes.guess_extension(mimetype) return extension and extension.strip(".").lower() in valid_extensions