kirkone/KK.AspNetCore.Images

Support multiple output formats

Opened this issue · 4 comments

The output format currently only allows aliases and always outputs jpg files.

    "OutputFormats": [
      {
        "FileEndings": ["jpg", "jpeg"]
      }
    ],

That is confusing and not really flexible as ImageMagick allows much more and some people might want to use webp.

I propose the feature to allow multiple output formats (or make them configurable). The config could look like this:

    "OutputFormats": [
      {
        "Format": "jpg" // <- This would be a supported format from ImageMagick
        "FileEndings": ["jpg", "jpeg"]
      },
      {
        "Format": "webp" // <- This would be a supported format from ImageMagick
        // "FileEndings": ["webp"] <- Optional setting that would overwrite the standard format
      },
    ],

I work on this i feature/reorg.
Would be nice to have some feedback.

Feedback from testing (can you create a feature package?) or feedback from looking on Code (can you create a PR?)?

The code is not ready for a pr and not fully functional.
Pr will follow as soon as I will have some more progress.

Than leave a comment if you are ready or make a tracking pr. I am happy to review.