More in this section
Forums / General Discussions / Image Compression Plugin

Image Compression Plugin

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Nick
    Nick avatar
    1 posts
    Registered:
    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.

     

    Thanks,

    Nick

  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    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.


    Regards,
    Pavel Benov
    Telerik
     
    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
    Registered:
    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