How can I create images with various sizes in wordpress (in the upload folder) by inserting images manually?

Asked

Viewed 40 times

-1

Good, I’m migrating a bootstrap news website to wordpress, I’ve already made the site and uploaded all posts and images, but the images only have a single size (there are not several replicates of the image with various sizes)as I can create multiple images with multiple sizes?

In the attached image is an example of what I intend to do:

Exemplo do que pretendo

We have the image: ao-aque-site-.png - when uploading to the wordpress library other images with various sizes are automatically created. I intend to do this for images that have not been uploaded directly from the wordpress library

1 answer

0


There are several ways to (re)create thumbnails. The easiest one is with plugins, but it will also be the slowest. An alternative would be to use the wordpress cli, for example. Or, if you use a CDN with the ability to generate the images dynamically, you wouldn’t even need to have all the images on your server.

Plugin

An example plugin is Regenerate Thumbnails. Just install and activate this plugin, open your interface in the administration, select the appropriate options for your case and press "Generate thumbnails". He’ll do all the work himself.

WP CLI

How to install the Wordpress cli will depend on your operating system and is outside the scope of this question. However, once installed, just use the command wp media regenerate --yes.

Sizes generated

Note that in these cases the images will be generated for the sizes defined by default in Wordpress and in your template (if specified). The sizes of Wordpress are

  • Thumbnail (150px x 150px);
  • Medium (up to 300px height or width);
  • Large (up to 1024px height or width);
  • Original (original image).

To add new sizes, you can use the method add_image_size in your template’s functions.php file.

CDN

Wordpress offers a free plugin plan Site Accelerator which includes unlimited use of a CDN as well as other functionalities.


A detail on your question. It doesn’t make much sense to say that you are migrating from Bootstrap to Wordpress. One thing has no relation to the other and your Wordpress theme can use Bootstrap. It’s like moving house and painting the walls the same color as the previous house.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.