How Do I Add an Image to a Shortcode in WordPress?

Adding an image to a shortcode in WordPress is simple. To do so, open the shortcode editor (found by going to “Tools” –> “Shortcode Editor”) and enter the following code:

[image src=”http://www.example.

com/image.jpg” alt=”Sample Image” width=”100″ height=”100″].

Where “http://www.com/image.

jpg” is the URL of the image you would like to use, and “Sample Image” is the text you would like to appear below the image. You can also specify a different alt text if you wish.