I have an image located in sites/all/themes/mytheme/images directory. I'm displaying it programmatically with attached image style like:
$style = array( 'style_name' => 'my_style', 'path' => drupal_get_path('theme', 'mytheme') . '/images/' . $filename, 'width' => 30, 'height' => 30, 'alt' => $alt, 'title' => $title, ); return theme('image_style', $style);
First error: 404:
"NetworkError: 404 Not Found - http://j.dev/sites/default/files/styles/my_style/public/sites/all/themes/mytheme/images/img.png?itok=qsTbAc8I"
Source image at public://sites/all/themes/mytheme/images/img.png not found while trying to generate derivative image at public://styles/my_style/public/sites/all/themes/mytheme/images/img.png.
I'm sure that img.png exists in sites/all/themes/mytheme/images
- sites/all/themes/mytheme/images: 777
- sites/default/files/styles/my_style: 777