+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Question with Content Provider, Custom Image Url

Question with Content Provider, Custom Image Url

5 posts, 1 answered
  1. Bradley
    Bradley avatar
    3 posts
    Registered:
    10 Jan 2011
    11 Apr 2013
    Link to this post
    I'm a bit new to Sitefinity development, and am looking for where to start. So basically I would like the images in my site to be served from a different sub-domain. 

    So when it renders out the link for Images, it renders them from http://content.mysite.com/Images/headergraphics/home.png?sfvrsn=4
    instead of /Images/headergraphics/home.png?sfvrsn=4. The original link still needs to work, however when it's rendered to the page, i would like it to change the sub-domain. 

    Any help would be appreciated. 

    ~Brad
  2. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    16 Apr 2013
    Link to this post
    Hi Bradley,

     Thank you for contacting us.

    With the current configuration settings this is not possible. Could you inform me what functionality you are trying to achieve by having media served from a sub domain but still remaining on the same site? Perhaps I could help you resolve your issue as a whole.

    I look forward to your reply.

    Greetings,
    Patrick Dunn
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Bradley
    Bradley avatar
    3 posts
    Registered:
    10 Jan 2011
    16 Apr 2013 in reply to Patrick Dunn
    Link to this post
    Patrick, 
    Thank you for your reply, What i have is an Edge CDN (content.mysite.com) that draws it's content on a request basis from www.mysite.com. So when requesting images i want the url in the rendered content to be from content.mysite.com but when the cdn requests it, it needs to be available from the original url...

    Example: 
    www.mysite.com/Images/Image1.png would be the library location, but when rendered to the page the tag would be:
    <img src="http://content.mysite.com/Images/Image1.png">

    Any help you can provide would be of great assistance. 
    Thanks
    Brad
  4. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    17 Apr 2013
    Link to this post
    Hi Bradley,

     There is no setting to move the images to CDN yet although it is in discussion to start providing out of the box support for some popular CDNs.
    Since Sitefinity 4.4 we have supported windows Azure blob storage where the images can be uploaded, but there is no support for Amazon. In case this can be useful to you to create a new storage provider for Azure go to Administration->Settings->Storage Providers and there you will see database and file system already existing with an option to add new storage provider for Azure. This is the first cloud storage provider we have added to Sitefinity, for the next release in mid February a new storage provider will not be introduced. Excuse us for the inconvenience. 

    It may help in your situation that we have a blog post detailing how to connecting to amazon S3 providers. It's open source and the GitHub link is in the blog post.

    Otherwise Sitefinity 6 will include additional cloud support but not for CDN like you may desire, however, it is on the list for a latter but undefined release.

    I hope this helps and I apologize for any inconvenience this may cause.

    All the best,
    Patrick Dunn
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Bradley
    Bradley avatar
    3 posts
    Registered:
    10 Jan 2011
    17 Apr 2013 in reply to Patrick Dunn
    Link to this post
    Patrick, 
    Thank you for the replay, I was actually able to do this by Inheriting the ImageControl and changing the logic that comes out of the ResolveMediaUrl method, simply checking for design time to make sure that it only uses the CDN when appropriate. 

    Thanks for your help though..
    ~Brad
    Answered
5 posts, 1 answered