RFC - Throw an exception if an invalid value format is provided instead of silently converting it to `jpg`.
Currently any invalid value for fm gets silently coerced to jpg by the encoder. This behavior, while ensure an image is always generated, has couple of issues.
- A dev error like a typo in the format name would be difficult to track down since the lib gives no error about it.
- Since all parameter values are used to generate the hash key using multiple invalid value for
fmwould generate multiple cached images which would be actually the same.
Based on the community feedback I would like to throw an exception instead for an invalid format value.
Tagging in recent contributors to the 3.x branch @deluxetom @Art4 @nlemoine @konnng-dev
What about throwing an exception and adding an option for a default format on invalid fm.
@Art4 I like that idea, it would need to be defined as a preset, right?
What about throwing an exception and adding an option for a default format on invalid fm.
So if the default format option is set that would be used instead throwing an exception in case of an invalid fm? I too like the idea.