kevbaldwyn / image

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

Image path is being built using base_path() and not public_path() #1

Closed rreimi closed 11 years ago

rreimi commented 11 years ago

In Image@serve method line 64 i think there is a wrong function call, the image path is being build using the application base path, maybe its better to call public_path() there?

kevbaldwyn commented 11 years ago

The reason that base_path() is being used over public_path() is purely for flexibility. The image is being served through the file system not over http (through the use of a custom route), this means the image can exist anywhere on the filesystem not just the public dir.

I've not used this package in production yet and it's early use at the moment so maybe there is some merit in restricting it to only the public path. I can see that at the moment you will need to add the public dir to the start of the image path you are including which is not ideal.