Currently to show an image on SN you have to specify the correct markdown. It'd be nice to just display the image when provided an image link without requiring markdown.
e.g. when a stacker puts this image link in a comment or discussion post https://imgproxy.snort.social/h_yDski4D7T74dzC6fwcBqwBoMOw3og33BmkNewTMjA/rs:fit:586:586/dpr:2/aHR0cHM6Ly9tZWRpYS50ZW5vci5jb20vVzY0SVhKQmZGcFlBQUFBQy9maXJpbmctZ3VuLWplbm5pZmVyLWNvb2xpZGdlLmdpZg
It renders this without requiring markdown https://imgproxy.snort.social/h_yDski4D7T74dzC6fwcBqwBoMOw3og33BmkNewTMjA/rs:fit:586:586/dpr:2/aHR0cHM6Ly9tZWRpYS50ZW5vci5jb20vVzY0SVhKQmZGcFlBQUFBQy9maXJpbmctZ3VuLWplbm5pZmVyLWNvb2xpZGdlLmdpZg
I'll pay double the bounty if it's well implemented with minimal need for changes. I'll pay triple the bounty if you also make it work for link posts where the link is an image.
Okey so I ended up working on both parts,
.gif,.png)and
Here's a 4 minute video demo:
https://www.loom.com/share/028b0dfd00da4aa49827d285c2320209
any feedback from stackers here would be appreciated, and of course from the guys at SN HQ. thanks
Sorry for the delay. I still haven't reviewed the code but that's my fault - not yours.
Sent you another 50k sats as recommended by @ekzyis after his review.
much appreciated 👍 i keep an eye on github so any changes needed just fire me an @ on there and I'll dee what i can do
Just pledged sats to this post to help with the bounty.
This will be a great improvement to the UI for SN!
thank you sir 🤠
I'd like to work on this Bounty, but I don't want to do so if I'm duplicating someone else's work. How do I know if anyone has claimed this?
This is valid concern. Bounties might need to have an additional status to avoid multiple people working on the same bounty. Might suggest:
to claim
I agree it's a problem, but that solution creates the problem giving anyone the right to prevent everyone else from working on a bounty without any cost to them or test of credibility.
A middle of the road approach might allow people to signal that they're working on a bounty in a special kind of comment and comment section, and anyone else who might work on the bounty can fully gauge the risk of also working on it.
I like the transparency of seeing who else might be working on a bounty.
Just brainstorming:
Maybe a user pledges Sats to Claim the right to work on bounty. Highest bidder is awarded the status of Claimed. Once completed they receive bounty plus sats pledged.
If they don’t complete the bounty they lose sats and Claim goes to second highest bid.
Users would bid high on bounties they are confident that match skills and can complete.
That probably ideal game theoretically. It's putting up a bond.
It does introduce new problems: complicated UX and makes having sats a prereq. I'm not sure SN's bounty economy is ready for that, but it's probably the terminal state of a healthy bounty economy.
deleted by author
If someone else has implemented it and I've accepted it, this bounty on SN will show as paid.
If someone has implemented it, they'll likely have submitted a PR.
ok, well I'll give it a go and hope nobody else is hacking away at it, otherwise my time will be wasted. still, will be a good to learn a bit about the SN codebase
I didn't start working on this to give new contributors a chance :)
(I have been contributing to the SN codebase for some time now and I also claimed the previous bounty.)
Looking at the comments and Github, I think no one else has picked this up so I think you have good chances to get the bounty.
I am also glad to see someone picking this up!
Created a new Github issue for collating any feedback: https://github.com/stackernews/stacker.news/issues/239
thanks for the comment, spent some time tidying up and ended up also implementing the async lookup for when regex won't work.
i'll do a write-up in the morning and share it to get some feedback. once I started digging into this feature I found lots of little edge cases and considered several ways of implementing it, so i'll be curious what you think of the code
There will be more bounties and if someone beats you to it yet your work is solid, I'll give you a partial bounty for the effort.
I've got the first slice of this feature coded up, just needs a bit of tidying.
I figured that it'd makes sense to break the work down into two parts:
i'll open up a pull request to get some initial feedback and if you'd prefer not to merge until both parts are completes, that's your prerogative
What if, for some reason, you just want to display the url of an image?
When would you want to do that?
I'm not sure. If you want to let user decide if they want to load the image or not (dirty image, large file size...)
When this goes live, consider the door open to the meme avalanche, it will not be stopped
Nice sample photo choice
It's my current profile background on nostr: https://snort.social/p/npub1qkfnmpuz692azr8c5phn0930x2v92xyqvwgr6ve8znaa3qd6c3hq09ertp
Big Coolidge fan recently
This will make image posting easier. When I post an image after putting markdown, I use the preview feature to see if the image is reflecting. When this bounty is integrated, some steps will be eliminated whenever I make an image post.
We'll still be able to use markdown right?
https://img.memegenerator.net/images/73394682.jpg
Lol mark downs days are numbered, I got shouted at for using it on Nostr apparently its the devils magic
dude I hope not, I love markdown.
I think it's very much going strong. It's really popular in stats/data science
One day!
deleted by author
Regex fails on the image I provided in the bounty. Extensions are hints and conventions but are often not present.