Image Compression Plugin - General Discussions - General Discussions - Progress Community
 General Discussions

Image Compression Plugin

  • Image Compression Plugin
  • Hi - I was wondering if there is some kind of image compression plugin for Sitefinity? Similar to SmushIt or TinyPNG.




  • 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.

    Pavel Benov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
  • Is there also an easy way to do this compression when a thumbnail version of the image is created?