This has a link attached to it

This doesn't

See how different there are.
I'm using the following class: http://image.intervention.io/api/fit to fir and re-size my images within a slider. But when I add it in a <a href=""> it doesn't show the correct width or hight.
Here's my controller code for the image resize.
if (Input::hasFile('image')){
$file = Input::file('image');
$name = str_random(12).'.'.$file->getClientOriginalExtension();
$image = Image::make(Input::file('image')->getRealPath())->fit(880, 400);
$image->save(public_path() . '/uploads/files/' . $name);
$slider->image = $name;
}
Which does re-size the image correctly, but then in my html I have
<div class="mainSlider">
@foreach($slider as $slide)
@if ($slide->url != '')
<a href="http://{{ $slide->url }}"><img src="/uploads/files/{{ $slide->image }}" /></a>
@else
<img src="/uploads/files/{{ $slide->image }}" />
@endif
@endforeach
</div>
Which check if an image as a URL attached to it, but the ones with the URL so slightly smaller on screen when uploaded then the ones without a URL.
Has anyone encountered this problem before, and/or how does one get around this?
That trick should work try this. Wrap your img with a that doens't have href attribute. That anchor tag will be like normal tag since it doesn't have href attribute so if will not redirect some link.
@if ($slide->url != '')
<a href="http://{{ $slide->url }}"><img src="/uploads/files/{{ $slide->image }}" /></a>
@else
<a>
<img src="/uploads/files/{{ $slide->image }}" />
</a>
@endIf
Please or to participate in this conversation.