Wordpress - linking to images in HTML not working

I am building a website using Wordpress and am currently trying to put social media buttons in the header using a text widget for HTML input, but the images are not showing and I am wondering if it has something to do with the file permissions when I started out While developing a website, I tried to load the header image and got the error "Failed to create directory [directory name] Is its parent directory writable by the server?" So I went to termnial and typed sudo chmod -R a + w / Applications / XAMPP / xamppfiles / htdocs / sitename / wp-content / which solved the upload problem.

I am developing locally and when I use an external website as the src for an image, it displays a button on my website.

My images are stored in: / Application / XAMPP / xamppfiles / HTDOCS / site_name / wp-content / myimages /

The website files are located at: / Applications / XAMPP / xamppfiles / htdocs / site_name / wp-content / themes / twentyfifteen-child /

Now the src link should be: src = "../../myimages/instagram.png" but it is not, and I tried other options, even using the full link starting at / Applications

So my question is, is it really a file permissions issue and if so, what permissions should I use and how to enter it. However, if it's not permissions related, what else can I do to fix the problem?

+3


source to share


2 answers


either "/wp-content/myimages/img1.png" or just upload the images via cms media upload and then grab the url from here. This makes it faster.



+1


source


you manage to get the images please try this

in the text widget try to pass the file Path like below:

<img src="http://www.sitename.com/wp-content/myimages/img1.png" />

      



for this, please confirm the image location to load the image path into the browser http://www.sitename.com/wp-content/myimages/img1.png

I'm sure this will help!

+1


source







All Articles