For example, a picture of a product, users upload an original image, and in different parts of the site need to show different sizes, such as List page, detail page, mobile phone version, then we how to do it, is the first time to save multiple copies of the upload? Need not retain the user's original image, found that there is still a way, hungry is this,
The following parameters can be arbitrarily adjusted to output different size of the picture, it is estimated that he is to save an original image is it, we think that the practice of comparison?
Reply content:
For example, a picture of a product, users upload an original image, and in different parts of the site need to show different sizes, such as List page, detail page, mobile phone version, then we how to do it, is the first time to save multiple copies of the upload? Need not retain the user's original image, found that there is still a way, hungry is this,
The following parameters can be arbitrarily adjusted to output different size of the picture, it is estimated that he is to save an original image is it, we think that the practice of comparison?
For small teams, of course, the use of images like seven cows or a cloud cloud storage, with CND, but also with the API to image processing.
On your own server you have to consume more traffic, compute resources, things that you can not put on your own server, of course, or put on the seven bull or Pat cloud good.
There is also a way to turn the picture into a base64 database, this step can be done in the front end, of course, but also the pros and cons, is the cache is inconvenient, but the picture a small number of words also can not, than with 7 of cattle more convenient.
My usual method is to mirror to seven of the cattle cloud storage L and the like service providers. Because they can generate thumbnails more flexibly and bring their own CDN
Maybe everyone has a different way of handling, my way of handling is; for uploaded images, create a separate folder to save. Of course, in this file directory can be based on the year and month to build a directory, Ueditor for the uploaded images in this way. For the name of the picture, it can be simply processed and named after a random string, such as a picture of this list page: http://blog.92fenxiang.com/category/showcat/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91