Web site for users upload pictures How to save processing appropriate?

Source: Internet
Author: User

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

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.