-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strapi recognizes plugin, but does not optimize images #36
Comments
Hey, any updates on this topic? Got same issue, strapi 4.21.1 |
Experiencing the same issue with Strapi 4.20.5 and strapi-plugin-image-optimizer ^2.2.1 |
same issue here |
Hello everyone, Thanks to all contributors for this project and for the work done. I faced the same issue today and found out that we don't try to register the extension if we use .ts extension for "extensions/upload/strapi-server" file. I didn't check why it does, but I guess that it might be a bug in strapi code if it worked before. Versions:
@wdmtech, @tagperfect, @azamatsalamat, @freddieerg, Disclaimer: Temporary fix:
It works for me. UPDATE: Then you will be able to use it with the following code:
|
Wow, thanks for looking into this @echolimazulu. Super helpful!! :) |
Package versions
Strapi version: "4.13.6"
strapi-plugin-image-optimizer version: "^2.1.1"
The issue
I wasn't able to get the plugin to work with my current project (stuck on older version since other plugins require updating), so I created a brand new Strapi project with
npx create-strapi-app@4.13.6
(the same version my current project is running)However I see the same issue even on a clean project.
Someone else in Discord is experiencing this issue too (although they don't specify their Strapi version)
Reproduction
Created the project, then I added the override file at
src/extensions/upload/strapi-server.ts
I created a new
plugins.js
file atconfig/plugins.js
to contain the example config settings provided in README.MDI ran
npm run build
and thennpm run develop
I can see that the plugin is loaded in the Plugins section of the Admin panel
Uploaded a jpg image with fairly large dimensions (photo size)
Queried the asset, observed that only the default Strapi media sizes are available, and the file is in its original format
I think that's all the steps followed correctly, maybe not? :-D
Any help appreciated. Any idea what I might be doing wrong?
The text was updated successfully, but these errors were encountered: