Вопрос

For several of my applications (MVC3 / RoR / PHP) I am looking for a library (framework or as a service) to resize images on the fly + host the different sizes on a CDN / cache somewhere not to use my own bandwidth.

Bonus : It should work on mobile too to generate thumbnails + store them on a cache somewhere (S3 or Rackspace, whatever).

Thank you very much in advance for your replies.

Cheers

Это было полезно?

Решение

My company launched a service like this : cloudimage.io, but a few others exists too:

For cloudimage.io, if you have an image such as http://mywebsite.com/photo.jpg, you can simply resize it at 400px for mobile like this : http://cloudimage.io/t/resize/400/mywebsite.com/photo.jpg.

Then the mobile will download the images directly in the right size. On a mobile application, if your app is used worldwide, having your images stored on a worldwide CDN is usually better for the user experience.

You'll find a lot of examples on the above websites.

Другие советы

For Rails, you can use CarrierWave or PaperClip.
You can specify the external CDN (such as Amazon EC2) to store the cached and generated images.

CarrierWave allows you high flexibility, ranging from dynamic generation of thumbnails (as specified by you; courtesy RMagick - Ruby ImageMagick impelmentation), size constraints, extension blacklisting and so on.

Hope it serves your purpose.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top