Validate imageSizes.formatOptions.format
against mimeTypes
in Uploads config
#11688
PatrikKozak
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when defining
imageSizes
in an upload config, there’s no validation against themimeTypes
array in the collection config. This can lead to a situation where an invalid image format is used inimageSizes
, but the error only appears at runtime when attempting to upload a file.For example:
In this case, the config is invalid, but the issue is only caught when an upload happens.
Proposed changes
imageSizes
is missing frommimeTypes
.Considerations
mimeTypes
is undefined, no validation should occur, since the field is unrestricted.Beta Was this translation helpful? Give feedback.
All reactions