Skip to content

Instantly share code, notes, and snippets.

@RyanABailey
Created September 3, 2014 07:45
Show Gist options
  • Select an option

  • Save RyanABailey/0f38a43fd52439165da9 to your computer and use it in GitHub Desktop.

Select an option

Save RyanABailey/0f38a43fd52439165da9 to your computer and use it in GitHub Desktop.
SharePoint 2013 access image URL for custom image field on a page
var image = (ImageFieldValue)SPContext.Current.File.Item["ImageFieldName"];
if (image != null)
{
string imageUrl = image.ImageUrl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment