I am using image_style_url to get a thumbnail of a picture I added through the administrator interface.
// $foo->field_picture['und'][0]['uri'] has value public://foo.jpg
image_style_url('foo-thumb', $foo->field_picture['und'][0]['uri']);
The API states that the image will be created when the URL is requested. However, when visiting the page the image isn't displayed (404). The URL returned from the function seems to be well formed, but the file hasen't been created.
The 'foo-thumb' folder is in the public data folder and the file permissions should be OK. I tried flushing the image cache (drupal image-flush foo-thumb) but still no results.
Any ideas?