pull down to refresh

Is there a way for an image to be a link to a website?
cc @k00b @sox

what

reply

Instead of zooming in when you click the image, it takes you to a website.

reply

I tried for a while to do it, as I think the standard markdown syntax is [![alt-text](image-url)](link-url) but it seems that gets sanitized to just ![alt-text](image-url)

reply
50 sats \ 4 replies \ @sox 7 Apr

Whoops. I remember fixing this specifically for Darth coin when they tried to do the same.
I'll check this out, thanks!

reply
377 sats \ 3 replies \ @k00b 7 Apr

We do this intentionally!

... because it changes the expected behavior when clicking on an image, it is deceptive. I don't want to click to enlarge an image and have it take me to another website.

... at most we should break it into two nodes: image and link separately.

reply

I understand and agree. But if the image were a link, instead of the magnifying glass appearing, the hand icon could appear and behave like a text link, right? just an idea!

reply
22 sats \ 0 replies \ @sox 7 Apr

Can't do this on mobile :(
We need to avoid dark patterns as much as possible.

reply
22 sats \ 0 replies \ @sox 7 Apr

Damn now I remember! https://github.com/stackernews/stacker.news/pull/2690 It makes sense.

Sorry guys I woke up like 2 hours ago and it's almost 7 pm here lol.

... at most we should break it into two nodes: image and link separately.

I'd be okay with this behavior, just to help people that are used to images in links. We can do this through the transform step.

Buuut since it's not an emergency, I'd postpone this to the next Editor update. We have cool plans for media in general, some were teased in the first Editor announcement post.

reply

I tried that too! thanks anyway

reply