[development] Using D7 styled images
Jeff Greenberg
jeff at ayendesigns.com
Fri Jun 18 04:13:03 UTC 2010
Some more info. It seems that file_uri_target() is returning false, and
that image_style_url() creates the url as url('image/generate/' .
$style_name . '/' . $scheme . '/' . $target, array('absolute' => TRUE)),
despite the fact that $target contains false rather than a uri.
On 6/17/2010 4:28 PM, Jeff Greenberg wrote:
> I have used the predefined image styles (thumbnail, medium, etc.)
> within views. As a result, I note that with a file path for node
> attachments of styles/default/files/field/image, the styled image
> exists in styles/default/files/styles/medium/field/image.
>
>
> So now, I am inserting a php snippet into a block, to make use of a
> styled image. The api says that the path should be relative to the
> files path. My call is:
>
> theme_image_style(array('style_name' => 'medium','path' =>
> 'field/image/myimage.png','alt' => 'text'));
>
>
> The resulting HTML is <img typeof="foaf:Image"
> src="http://mydomain.com/image/generate/medium//" alt="text" />
>
>
> so, I assume that /image is a callback url rather than something that
> should exist in the file system. If not, that's the first issue. Then,
> the /medium// seems to be missing the file name.
>
More information about the development
mailing list