You are here

function remote_stream_wrapper_image_style_path in Remote Stream Wrapper 7

Copy of image_style_path() for use with remote images.

When image_style_path() is give a file like 'http://example.com/image.png' it is converted into 'http://styles/stylename/http/example.com/image.png' which will fail image_style_deliver().

3 calls to remote_stream_wrapper_image_style_path()
RemoteStreamWrapperTestCase::testRemoteImageStyles in ./remote_stream_wrapper.test
Test that remote images can be used with image styles.
remote_stream_wrapper_image_path_flush in ./remote_stream_wrapper.module
remote_stream_wrapper_image_style_deliver in ./remote_stream_wrapper.image.inc
Copy of image_style_deliver() for use with remote images.

File

./remote_stream_wrapper.module, line 130
Provides a remote stream wrapper and file field integration.

Code

function remote_stream_wrapper_image_style_path($style_name, $uri) {

  // Force the image style to be returned with the default file scheme, but
  // with the file's original scheme in the path.
  return file_default_scheme() . '://styles/' . $style_name . '/' . file_uri_scheme($uri) . '/' . file_uri_target($uri);
}