4 ms·
Most websites will recompress user images. Although you probably don't want to do it client side. The biggest reason is if course cost saving. Store and transf
by kevincox 4y ago
Most websites will recompress user images. Although you probably don't want to do it client side.
The biggest reason is if course cost saving. Store and transfer smaller images. This could be done client side with a server side check on max size.
Another big reason is metadata stripping. Both to protect the user (can be done client side) and to avoid unintentional data channels being provided.
Another reason is to avoid triggering exploits. If a major browser has a JPEG rendering exploit Facebook doesn't want you to be able to pwn everyone who sees your post. By using a trusted encoded it is very likely that the produced image is more or less following the standards and not likely to trigger any exploits (as exploits usually require invalid files).