Brendan
Brendan

Reputation: 387

image is in .ashx and need to to read as png

I am using sitecore and all images are converted to .ashx handler. I currently added a script to share images on google, facebook, twitter. When someone selects the share button for example on facebook, it longer embeds the png image because it doesnt recognize .ashx as an image. Is there something I can add to my script to handle this?

Thanks.

Upvotes: 0

Views: 1648

Answers (1)

cpp
cpp

Reputation: 341

Brendan,

You will need to set the "Media.RequestExtension" setting, I generally create a SitecoreSettings.config file under the /App_Config/Includes/Custom folder to house my seetings. Out of the box Sitecore uses the ASHX extention for all items stored in the Media Library.

  <setting name="Media.RequestExtension">
    <patch:attribute name="value"></patch:attribute>
  </setting>

More information about Media URL can be found from this John West article: http://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/12/Sitecore-Idiosyncrasies-Media-URLs.aspx.

Hope this helps.

Chirag

Upvotes: 3

Related Questions