I'm having issues trying to get the media image item using url/path like /-/media/Infosite/Images/Content/Teasers/relevant-curriculum-small.ashx?modified=20170314020859&hash=3835E0B83346B4B33EB0787E69117CF560457FFA
using the dynamiclink method mentioned here. I also tried stripping off the querystring part but of no use.
I'm trying to retrieve the media item height/width programmatically.
FYI - These media links comes from Rich Text Editor fields in Sitecore.
Any help would be appreciated!
/-/media/
with/sitecore/media library/
, remove everything starting from the.ashx
, callMainUtil.DecodeName
on what you received and then tryDatabase.GetItem
with the value. ButMediaRequestHandler
does many other operations so I cannot guarantee that it works.