Replacing remote images with local uploaded images issue

reprocase:

  • insert an image (using an external url) in a post using a link reference.
  • wait for the system to replace the external url with an uploaded copy.
  • the url is replaced by an html <img> tag.

bug: the url in the refence il also replaced with the html <img> tag.

1 Like

I’m not following.

Are you saying you want the link to an image in the post to not be changed into the image?

That is the expected behavior.

If you want the link to stay a link don’t put it on it’s own line
Or enclose it in backticks so it gets rendered as a text URL

No @Mittineague, this is not the point.

Maybe this gist will help:

Ahh, you’re not using the correct MarkDown syntax for links.

http://daringfireball.net/projects/markdown/syntax#link

It should be
[link text here] (URL here)

* with the URL in parentheses not as HTML or a “raw” URL

EDIT
:d’oh:
Sorry, I misunderstood what you’re wanting to do. Not a link, but

http://daringfireball.net/projects/markdown/syntax#img

Reference-style image syntax looks like this:

![Alt text][id]

Where “id” is the name of a defined image reference. Image references are defined using syntax identical to link references:

[id]: url/to/image “Optional title attribute”

1 Like

Let try my example on meta:

Ou est Charlie ?

Char

Let me try

![Char](https://img.over-blog.com/4/22/39/26/Personnages-ridicules/Charlie/Where-is-waldo-ou-est-charlie.jpg)

Char

Same thing happens

<img src="https://img.over-blog.com/4/22/39/26/Personnages-ridicules/Charlie/Where-is-waldo-ou-est-charlie.jpg" alt="Char" height="308" width="292">

Did you confirm this is a bug ?

I don’t know. What is the expected behavior?

expected result shoud be :

exemple here :

Ou est Charlie ?

![Char][Charlie]

[Charlie]: /uploads/default/original/1X/70bdb0afec7b129ae882d21587d82d09c2f0a6c3.png

and not :

exemple here :

Ou est Charlie ?

![Char][Charlie]

[Charlie]: <img src='/uploads/default/original/1X/70bdb0afec7b129ae882d21587d82d09c2f0a6c3.png'>

Where are you seeing that? I can’t find it.

you need to wait some job maybe this one:

the problem seems to be in this regexp because my link reference is not a number :

2 Likes

I see we should probably fix that @zogstrip.

1 Like

Took a while, but I believe @david’s rework of this sub system fixed this long standing issue.

1 Like