WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Image Source Links (1 post)

  1. charlier1991
    Member
    Posted 4 years ago #

    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 :)

    Charlie R

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.