Dynamic Image Source Links
I notice that the image source when an image is inserted through the wysiwyg editor is a static image link for example:
<img src="http://www.example-url.com/wp-content/uploads/2009/12/example-image.jpg" alt="example-image" title="example-image" width="320" height="240" class="alignnone size-full wp-image-42" />
But ideally this code should generate as the following:
<img src="<?php 'http://'.$_SERVER['HTTP_HOST']; ?>/wp-content/uploads/2009/12/example-image.jpg" alt="example-image" title="example-image" width="320" height="240" class="alignnone size-full wp-image-42" />
This is because often development takes place on a server (for example http://beta.example-url.com) other than a live server (http://www.example-url.com). So this would allow for easy switching between urls of one site.
This could also be useful if the company who owns the website changes names etc, etc.
It wouldn’t be a long procedure to implement and would be a useful addition to what is already an amazing blog/cms software 🙂
- The topic ‘Dynamic Image Source Links’ is closed to new replies.