marlokessler / strapi-plugin-image-optimizer

Optimize your images for desktop, tablet and mobile and different image formats.
MIT License
14 stars 10 forks source link

Allow optimizing for format, but not size #11

Closed Cretezy closed 1 year ago

Cretezy commented 1 year ago

We have images which we don't care about optimizing in size, however generating in better formats (Like AVIF) is important to us.

Does it make sense to add to this plugin? I can contribute a PR.

marlokessler commented 1 year ago

Hi @Cretezy, this seems like a valid use case. It would be awesome if you could contribute the feature as a PR.

I think the best way to do this is by allowing image size objects without a width or height where only the new formats are then generated, e.g.:

sizes: [
    {
      name: "original",
    },
]

What do you think?