๐ผ๏ธ The MagicTM Ipx Strapi Plugin High performance, secure and easy-to-use image optimizer for Strapi CMS.
๐ Follow me: https://stawowczyk.me
Strapi v4 - (current) - v1.x
Tested on Strapi v4.25.4.
This plugin was originally created in https://github.com/strapi-community/strapi-plugin-local-image-sharp. Due to lack of maintenance, I decided to create a new plugin with the same functionality and more features.
- Image Processing: Resize, crop, and optimize images on the fly.
- Cache: Cache processed images for faster loading times.
- Custom Paths: Define custom paths for ipx to listen on.
- Configuration: Configure cache directory, cache duration, and more.
- [] TODO: Debug Mode: Enable detailed logs for debugging purposes.
- [] TODO: Delete Cache: Delete cache files on demand or automatically.
npm install @magictm/strapi-plugin-ipx
Navigate to your Strapi project's configuration file:
<strapi app root>/config/plugins.js
or .ts
Add the following code snippet:
'magictm-ipx': {
enabled: true,
}
'magictm-ipx': {
enabled: true,
config: {
// Enable debug mode for detailed logs
debug: false,
// Cache dir
cacheDir: '.my-cache',
// Cache duration in seconds
maxAge: 3600,
// Paths for ipx to listen on
paths: ['/uploads'],
},
}
cacheDir
can also be configured in .env
file settings STRAPI_PLUGIN_MAGICTM_IPX_CACHE_DIR
.
export default () => ({
// other plugins
'magictm-ipx': {
enabled: true,
},
})
For the changes to take effect, restart your Strapi application:
npm run develop
Same as https://github.com/unjs/ipx
Contributions to the MagicTM Ipx Strapi Plugin are always welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- Commit your changes with descriptive messages.
- Push your changes to your forked repository.
- Submit a pull request to the
master
branch.
If you find this plugin valuable, consider supporting its development. Your contribution helps me maintain and improve this project.
- Buy me a coffee: https://www.buymeacoffee.com/m7rlin
- Support via PayPal: https://paypal.me/merlinArtist
We appreciate all sponsors! Please contact us if you're interested in sponsoring this project.
MIT License ยฉ 2024-PRESENT Marcin Stawowczyk (m7rlin)
Thank you for using the MagicTM Ipx Strapi Plugin! Let me know if you have any other questions.