Image Compression Plugin
Hi - I was wondering if there is some kind of image compression plugin for Sitefinity? Similar to SmushIt or TinyPNG.
Thanks,
Nick
Hi Nick,
In case you want to implement such a compression there is an easy extension point where you can plug in custom logic in order to achieve the desired result.
You have to inherit Telerik.Sitefinity.Modules.Libraries.Data.OpenAccessLibrariesProvider and override the method UploadImage. There you have the new Image object, the stream and the mime type of the content. You can apply any compression you want on the stream and then call the base UploadImage method. To get your code working, you have to register your provider. Go to the backend -> Administration -> Settings -> Advanced -> Libraries -> Providers -> OpenAccessDataProvider. In the field ProviderType, enter the namespace + class name of you type and Click Save changes.
Regards,
Pavel Benov
Telerik
Is there also an easy way to do this compression when a thumbnail version of the image is created?