I have a WordPress website that was customized by a php developer. He created a folder for images in the root of the website. I have a requirement to move this foder from the root of the website to inside the wp-content\images\ folder.
Here is how the php file is written today using the image files from the folder in the root:
<img src="images/img1.jpg" border="0" style="padding-right:44px;"/>
<img src="images/img2.jpg" border="0" style="padding-right:44px;"/>
<img src="images/img3.jpg" border="0" style="padding-right:44px;"/>
<img src="images/img4.jpg" border="0" style="padding-right:44px;"/>
<img src="images/img5.jpg" border="0"/>
Now that I moved the images to the wp-content\images\ folder, I tried many combinations (wp-content/images/img1.jpg; /wp-content/images/img1.jpg; public_html/wp-content/images/img1.jpg;/public_html/wp-content/images/img1.jpg), but the images are not showing up. How should I refer to the images in that folder?
Many thanks!
Rob.
If your images are associated with a custom theme then they should be in your theme directory.
You can use the get_bloginfo wordpress api to get an absolute url to this directory.
See the above link for important information on different variations of this.
So you would replace your image links with something like