[development] Using D7 styled images

Jeff Greenberg jeff at ayendesigns.com
Thu Jun 17 20:28:08 UTC 2010

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 

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