I would like to ask you, the pros and cons of picture compression.

is there only two types of image compression now,
1. After the front-end js canvas is compressed, it is converted to base64,post and then saved to the backend as an image
2. Upload the image file directly to the backend, compress it on the server side, and then save

do not know which of the two ways is better, I now prefer method 1, so upload quickly
ask the boss to analyze the pros and cons from the aspects of security, efficiency, browser support and so on.

Mar.09,2021

if you need to keep the original image, use the second, otherwise the first


is compressed first, and then binary is transferred to the backend for storage. If there is a preview need at the front end, you can transfer it to base64, but it is not necessary to use it for transmission.


Mobile fee traffic can be compressed with the first front end, while PC users who don't care about the traffic can use the second server to compress

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45f22-44b82.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45f22-44b82.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?