Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dynamic thumbnails from images like phpThumb #241

Closed
simplenotezy opened this issue Oct 15, 2014 · 3 comments
Closed

Dynamic thumbnails from images like phpThumb #241

simplenotezy opened this issue Oct 15, 2014 · 3 comments

Comments

@simplenotezy
Copy link

I am used to phpThumb, but after getting started with Laravel I've found this package which really looks awesome so far. Great job!

I am just wondering if I should stick to phpThumb or instead try something new and use this package.

What I basically want to achieve is a dynamic way to generate a thumbnail, like it is possible with phpThumb.

Something like: http://myproject.com/image/{the_file}?width=300&quality=90

If this image in this quality and width does not exist from cache, it will generate it.

@olivervogel
Copy link
Member

Take a look: http://image.intervention.io/use/url

@simplenotezy
Copy link
Author

Wow - fantastic fast reply. I've taken a look at it. Seems very good.

But checking out http://image.intervention.io/api/fit, i see that if height is not provided, it will take same value as width. This is fine, but it would be cool if it was also possible for it, to calculate the height based on the width, to keep the aspect ratio. Is this possible?

Good job with the documentations also!

@olivervogel
Copy link
Member

My approach is not limited to some parameters like ?width=300&quality=90. You can define your own templates (described in documentation) and do whatever you like.

Its also more secure. Because the user can only access certain template cases and can't fill up the cache with garbage, when accessing width=1-100000.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants