filepicker.io - convert() and store vs FPUrl conversions

怎甘沉沦 提交于 2019-12-06 03:05:53

问题


I have an application where users upload an image and it has to be available in three different sizes (thumbnail, medium size, full size). The image does not need to be modified by my users.

It seems there are two options:

Option 1: Use image conversion urls whenever I want to display a thumbnail. Ex. https://www.filepicker.io/api/file/hFHUCB3iTxyMzseuWOgG/convert?w=200&h=250

Option 2: Use convert() with store to store the thumbnail in S3.

My question is can I use Option 1? How would this impact performance? Are the converted files cached on filepicker.io's end or does filepicker convert the image every time the user's browser hits the conversion url?


回答1:


The converted files are cached on our end, so using the conversion urls is entirely supported. If you know the sizes that you want ahead of time and don't think you'll need the variety, you can also use the .convert() call to "precache" the conversions, but it's more of a style preference than a huge performance difference




回答2:


Actually, there is a very important difference between using the Javascript .convert() method and using the /convert REST url.

Each time you call .convert() you use up one of the upload credits in your account, whereas using the /convert url method uses one of the conversion credits... and accounts have a lot more conversion credits than upload credits.

So, where possible, using the /convert url is significantly cheaper.



来源:https://stackoverflow.com/questions/13957492/filepicker-io-convert-and-store-vs-fpurl-conversions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!