I am trying to generate a URL for an image style, generated from an image in my theme directory:
$image_uri = drupal_get_path('theme', 'mytheme') . '/images/banners/projects-banner.jpg';
$banner_file = file_build_uri($image_uri);
$banner_url = image_style_url('my_image_style', $banner_file);
The $banner_url looks to be correct, however when I browse to it directly, I get a general Drupal error.
http://www.mysite.local/sites/default/files/styles/my_image_style/public/sites/all/themes/mytheme/images/banners/projects-banner.jpg
I had tried to pass $image_uri into image_style_url, but understand this need a URI and not a path. Can someone please point me in the right direction.