Answer the question
In order to leave comments, you need to log in
Cropping an image in worpdress?
How to crop certain images in wordpress (not all, but only some), and then use them, for example, for thumbnails. And it is necessary to crop not visually, but so that the size really changes.
There is a site pravilnovybrat.ru in the article a thumbnail is displayed, but it is too large to display it on the main page, on the main page it is necessary to display an already cropped thumbnail (and exactly a thumbnail!), how to implement this?
PS
I don't need to do anything with the size of the thumbnail itself, because it is displayed in the article (see the site), I need to make another image (a copy of this thumbnail) and crop it already, and then use it on the main page.
If you set the medium and large size, wordpress will crop all the images, but I do not need it (it takes up too much space on the server).
That's why I removed it altogether
update_option( 'thumbnail_size_h', 0 );
update_option( 'thumbnail_size_w', 0 );
update_option( 'medium_size_h', 0 );
update_option( 'medium_size_w', 0 );
update_option( 'large_size_h', 0 );
update_option( 'large_size_w', 0 );
Answer the question
In order to leave comments, you need to log in
In the media settings, set it like this
+
Remove everything from the theme add_image_size ()
The engine stops generating tons of thumbnails
Then connect https://github.com/bfintal/bfi_thumb
and change the output of thumbnails in the theme to
profit!!!
Now it sprinkles only the right size and only in the right place.
Thumbnails wordpress cuts according to the settings Settings -> Media files -> Thumbnail size. Actually, medium and large size can be changed in the same place.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question