• I have a wordpress installation installed on an internal server (on domain 1), using reverse proxy its viewable from the outside world (under a different domain (domain 2))

    The images have some problems loading due to the reverse proxy so we have added a folder on domain 2 with all the images and plugins etc on, this gets sycned with domain 1.

    Ive modified the plugins etc so all bar 1 work, and any images inserted into the wysiwyg editor.

    Code I used which updated the featured image: (in functions.php)

    function rewrite_images( $atts ) {
    $atts[‘src’] = str_replace( ‘wordpress.services.prl.co.uk’, ‘love2reward.co.uk/blog/’, $atts[‘src’] );
    return $atts;
    }
    add_filter( ‘wp_get_attachment_image_attributes’, ‘rewrite_images’ );

    anybody know how I can modify wordpress to load the images from the_content(); with a different url?

    Thanks

  • The topic ‘change the website URL for some media.’ is closed to new replies.