kevbaldwyn / image

Responsive images and on the fly image sizing for laravel 4 and fuel php
23 stars 13 forks source link

Image::path function repeat the first image inside a loop #2

Closed rreimi closed 11 years ago

rreimi commented 11 years ago

Consider this scenary:

$images is an array with to strings 1.jpg and 2.jpg

@foreach ($images as $img) <img src="{{ Image::path($img, 'resizeCrop', 350, 350) }}" /> @endforeach

There is the generated url for each image

1 = _img?img=1.jpg&transform=resizeCrop,350,350 2 = _img?img=1.jpg&transform=resizeCrop,350,350img=2.jpg&transform=resizeCrop,350,350

The url of 2.jpg is appended to first url.

I've check the path function and it seems to be related to pathString member of Image object. Maybe it have to be reset to route default value on each call?