Support » Plugins and Hacks » Images with relative URLs

Images with relative URLs

  • Hello

    I recently switched my site from serendipity CMS to wordpress. As a result the images in my blog posts carry the serendipity uploads directory path:

    <img src='/uploads/whatever.serendipity.thumb.jpg'>

    Because the path is

    a: Not wordpress uploads directory
    b: Relative path

    Generate post thumbnails tries to download as if they are complete URLs when in reality they are not. So this change above line number 190 ($saved_in_wordpress = false;):

    if(strpos( $image, 'http:' ) !== 0) {

    Fixes the problem and images are successfully assigned as post thumbnails.


  • The topic ‘Images with relative URLs’ is closed to new replies.