Skip to content

RFC - Throw an exception if an invalid value format is provided instead of silently converting it to jpg. #416

Open
@ADmad

Description

@ADmad

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 fm would 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions