statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
31 stars 1 forks source link

Allow additional file formats when using ImageMagic driver #956

Closed jacksleight closed 1 year ago

jacksleight commented 1 year ago

ImageMagick supports a lot of input file formats, and Glide will very happily pass them through so long as the output format is something sensible. But currently Statamic will block unknown formats in two places:

If you tweak these methods it's possible to convert all sorts with the glide tag.

Many of the formats ImageMagick supports require additional software on the server (like Ghostscript for PDFs) so it probably wouldn't be sensible to add every single one to these methods, but perhaps a new config option could be added where you can list additional formats you'd like to be allowed, something like:

'image_manipulation' => [

    'extra_input_formats' => [
        'application/eps' => ['eps'],
    ],

],
jacksleight commented 1 year ago

Closed in https://github.com/statamic/cms/pull/7666