theme_image_style() doesn't output what is expected
Drupal 7 provide Image style functionality which allow administrator to set predefined size and can apply image style to any image in site.


  Using image styles you can scale, crop, resize, rotate and desaturate
  images without affecting the original image. By default three sizes
  are defined: 'thumbnail,' 'medium', and 'large'. The thumbnail style,
  for example, is shown with the teaser for image posts and when
  browsing image galleries.


In your code, you have defined $img = theme('image_style', $params); which mean that you are applying image style to your image. 

When we apply image style to any image, it will create a new image in styles/[stylename]/public directory and does not affect the original image source.

There is no stylename in your http://mysite.local/sites/default/files/styles//public/images/image.jpg url after style part of url, so I guess $presetname is not properly defined in your code.

You can try below exammple:

$params = array(
    'style_name' =&gt; 'thumbnail',
    //'path' =&gt; $image_url,
    'path' =&gt; "public://images/image.jpg",
    'attributes' =&gt; $attributes,
    );
$img = theme('image_style', $params);