You are here

function picture_image_uri in Picture 7

Same name and namespace in other branches
  1. 7.2 picture.module \picture_image_uri()

Helper function to figure out the uri of an image given the image src.

Parameters

Image src starting with http://, https://, or root relative /.:

1 call to picture_image_uri()
_picture_filter_prepare_image in ./picture.module
Prepares a Render Array for theme_picture_formatter(). It is similar to picture_field_formatter_view() with modifications for inline images.

File

./picture.module, line 1339
Picture formatter.

Code

function picture_image_uri($src) {
  foreach (module_implements('picture_image_uri') as $module) {
    $function = $module . '_picture_image_uri';
    if ($uri = $function($src)) {
      $uri = file_stream_wrapper_uri_normalize($uri);
      return urldecode($uri);
    }
  }
  return FALSE;
}