A
A
Albert Kazan2018-02-20 15:35:47
PHP
Albert Kazan, 2018-02-20 15:35:47

How to compress photos/create a thumbnail?

Wrote a website from scratch. At the initial stages, when creating an image load, I decided to make the standard 320x320. Now I want to make the site more "mobile friendly". There are pages where these pictures are displayed in twenty or thirty pieces, and in the size of 50x50. For 3G, these photos take up to 5 seconds for the first download (then the browser itself compresses them, of course, but still). In general, I want to have thumbnails, since the user does not always look at pages where these pictures are full width and height. But there are already 1700 pictures, what can I do with it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaliy_P, 2018-02-21
@Farrien

I would do a check for the presence of a thumbnail, if it doesn't already exist, dynamically create (imagemagic, gd) and display it on the page

S
Saboteur, 2018-02-20
@saboteur_kiev

Take any utility for processing images in batches and generate thumbnails. There are even online utilities.
You can even convert them on the go in php itself ( php.net/manual/en/imagick.resizeimage.php )

M
Maxim Timofeev, 2018-02-20
@webinar

https://www.xnview.com/en/xnconvert/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question