More in this section

Forums / General Discussions / Image Compression Plugin

Image Compression Plugin

3 posts, 0 answered
  1. Nick
    Nick avatar
    1 posts
    28 Apr 2014
    31 Dec 2014
    Link to this post

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




  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    14 Mar 2016
    05 Jan 2015
    Link to this post
    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
  3. John Dillon
    John Dillon avatar
    1 posts
    07 Oct 2004
    20 Jan 2015 in reply to Pavel Benov
    Link to this post
    Is there also an easy way to do this compression when a thumbnail version of the image is created?
3 posts, 0 answered