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

isImage is not a function #41

Closed jonamax2 closed 6 months ago

jonamax2 commented 6 months ago

Issue

Getting error TypeError: isImage is not a function at Object.enhanceAndValidateFile (/node_modules/@strapi/plugin-upload/server/services/upload.js) when uploading files.

I've duplicated all the configs on the documentation.

Package versions

    "@strapi/strapi": "4.20.2",
    "strapi-plugin-image-optimizer": "^2.2.1",
jonamax2 commented 6 months ago

The issue was because the imageOptimizerService has to be called in the extensions file when using .ts files refering to the strapi-plugin-responsive-images package plugin.services["image-manipulation"] = imageOptimizerService();