How to build websites with many images

Source: Internet
Author: User
How do I plan to build websites with a large number of images and use lamp? what should I pay attention?
The first requirement is to be as stable as possible, and then to be more efficient


Reply to discussion (solution)

Is the image stored on the server hard disk or in the mysql database? Are there any differences between the two?

If you use a single image server and Nginx as a web server, is it a waste?

If the images are large and frequently used, we recommend that you store them on a separate server. for mysql binary files, you can store them on hard disks. For more information, see what your business needs.

Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.

If the images are large and frequently used, we recommend that you store them on a separate server. for mysql binary files, you can store them on hard disks. For more information, see what your business needs.

What are the differences between the two businesses?
I think that if there are many images and the query logic is complicated, it is suitable for storing in the database. if the query logic is simple, it is directly stored in the hard disk, in this way, the performance will be better. Are there other considerations?
Thank you for your advice.

Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.


The number of images is about tens of thousands, which is not very large. The maximum number is 3 MB. the user access is not very frequent, but a page is required to open 10 images, open speed cannot be too slow
If you only use one server and put images on a disk, is this solution sufficient?
Thank you!


Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.


The number of images is about tens of thousands, which is not very large. The maximum number is 3 MB. the user access is not very frequent, but a page is required to open 10 images, open speed cannot be too slow
If you only use one server and put images on a disk, is this solution sufficient?
Thank you!
Your description must be sufficient.
10 images are opened on a page, and 3 m is needed. js is used to speed up the page. first, open the image scroll bar on the screen and scroll down. Then, open the following figure.



Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.


The number of images is about tens of thousands, which is not very large. The maximum number is 3 MB. the user access is not very frequent, but a page is required to open 10 images, open speed cannot be too slow
If you only use one server and put images on a disk, is this solution sufficient?
Thank you!
Your description must be sufficient.
10 images are opened on a page, and 3 m is needed. js is used to speed up the page. first, open the image scroll bar on the screen and scroll down. Then, open the following figure.
My approach is to store images under files to facilitate file management.

There are not many 10 images on a page at all. Put the image in the hard disk and save the path in the database.



Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.


The number of images is about tens of thousands, which is not very large. The maximum number is 3 MB. the user access is not very frequent, but a page is required to open 10 images, open speed cannot be too slow
If you only use one server and put images on a disk, is this solution sufficient?
Thank you!
Your description must be sufficient.
10 images are opened on a page, and 3 m is needed. js is used to speed up the page. first, open the image scroll bar on the screen and scroll down. Then, open the following figure.

Okay. now, I understand. let's look for a solution using js.
The requirement for visual testing is not too high.




Database storage must be slower than direct storage of hard disks

If only a general website installs an nginx image server and creates a domain name separately, this will do.

A zimg server is recommended for professional purposes.


The number of images is about tens of thousands, which is not very large. The maximum number is 3 MB. the user access is not very frequent, but a page is required to open 10 images, open speed cannot be too slow
If you only use one server and put images on a disk, is this solution sufficient?
Thank you!
Your description must be sufficient.
10 images are opened on a page, and 3 m is needed. js is used to speed up the page. first, open the image scroll bar on the screen and scroll down. Then, open the following figure.
My approach is to store images under files to facilitate file management.
Okay. Thanks. how can I save the icon directly?

There are not many 10 images on a page at all. Put the image in the hard disk and save the path in the database.

Thank you!

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.