G
G
Gravio2021-03-09 11:08:53
Image processing
Gravio, 2021-03-09 11:08:53

How to properly compress an image for a website?

There is a stack restaurant site like this: nuxt js + adonis js + pgsql.

Images of goods are uploaded to google storage (jpg format) and are pulled by api, the weight of the image is about 5-6 mb, which is long enough for loading, how they can be compressed, preferably without a strong loss of quality, so that they are instantly loaded.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander, 2021-03-09
@Seasle

Another option https://squoosh.app/

I
iBird Rose, 2021-03-09
@iiiBird

For example https://www.npmjs.com/package/imagemin
for gulp is also https://github.com/sindresorhus/gulp-imagemin

W
WbICHA, 2021-03-09
@WblCHA

https://www.npmjs.com/package/sharp
Can do more than compress.

I
IlonMusk, 2021-03-09
@IlonMusk

You can use progressive jpeg or make your own. When loading, thumbnails (low quality pictures) are pulled up for you, and when the main ones are loaded, replace them

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question