• Resolved sexyboysclub

    (@sexyboysclub)


    Hi,

    I am wondering why the image links don’t seem to shorten when the plugin is automatically switching links to short links. I tried to manually shorten it the image link but it doesn’t seem to work.

    I have the following code that I used for the image.
    <a href="link to external that doesn't shorten"><img class="javimg alignnone" src="source of the image" alt="alternate text" width="800" height="536" /></a>

    Thanks.

    https://wordpress.org/plugins/shorten-url/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sed Lex

    (@sedlex)

    Because the plugin have an issue 🙂

    In line 902 of the plugin you have the foolowing line :
    $return = preg_replace_callback('#<a([^>]*?)href="([^"]*?)"([^>]*?)>([^<]*?)</a>#i', array($this,"replace_by_short_link"), $content);

    Modify it by

    $return = preg_replace_callback('#<a([^>]*?)href="([^"]*?)"([^>]*?)>(.*?)</a>#i', array($this,"replace_by_short_link"), $content);

    Thanks for reporting it

    A new version will correct this problem in few weeks

    Thread Starter sexyboysclub

    (@sexyboysclub)

    Ah great! Thank you very much it works very well now =].

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Image links don't shorten’ is closed to new replies.