Relative Paths to Images and Permalinks
-
I just coverted my blog over to using Permalinks instead of the typical mess of question marks and ampersands. It really was easy but I wanted to drop a note out here for people considering doing this.
When I add images to WordPress instead of putting in the full URL of the images (https://mydomain.com/pics/image.jpg) I always used relative URLS (pics/image.jpg).
The reason I did this was because I wasn’t (and still am not) sure I want to stick at the domain name I have perminetly. Changing the address would mean my images still displayed fine.
With permalinks though, my images do not display under all circumstances. A visit to https://www.dubyadubyadubyadotcom.com/ will show a couple of images however if I enter the post https://www.dubyadubyadubyadotcom.com/2005/01/30/dear-elle-macpherson/ the images no longer appear. This is because the browser is looking for the images to appear at https://www.dubyadubyadubyadotcom.com/2005/01/30/dear-elle-macpherson/pics/ which is not where they are.
I now have to run queries to alter all the image tags in my database to account for this – nothing particularly taxing however iit is something worth noting as a side affect of using permalinks.
- The topic ‘Relative Paths to Images and Permalinks’ is closed to new replies.