How To Get Image Source In Wordpress. If you click directly on an image, you won’t see the menu you want to see. To get started, install and activate the free featured image caption plugin from wordpress.org.

Now for example, if your theme has some image named example.jpg inside some folder name subfolder folder in the images folder. To display the image in the media library, use wp_get_attachment_image () function. To get images loaded correctly when i use img src in html, i have to give the entire file path.