I don’t understand. Sometimes my photos hosted on Amazon show a preview, most of the time they don’t and I can’t figure out why it works when it works or why it doesn’t when it doesn’t.
I 100% of the time have the link on its own line, so I don’t get it.
In the second instance, Discourse has interpreted whatever you entered as being NOT in a line by itself. To be really sure, make sure there is a blank line both before and after the URL. They have to be totally and completely blank; no spaces or anything that could be possibly interpreted as text.
I’ve had this happen too, and I know to always put the URL on its own line. I just know now that if it’s an Amazon link, there’s a 50-50 chance it’s not going to work.
I’m not sure why those links didn’t work, since when I tried it they appeared to work in the preview window when they were on their own line, but the thumbnails didn’t appear in the actual post. However, you can do better than that by clicking on the image to get the full-resolution image, and then (to use an example for Firefox) right-clicking and selecting “View Image”, and then cutting and pasting that URL in your post, on its own line, thus:
“Sorry, we were unable to generate a preview for this web page, because the web server returned an error code of 401. Instead of a preview, only a link will appear in your post”
And I also get an error when I don’t open it as a new tab…
I am a Prime customer, so I initialized my account (it’s free for Prime members) and uploaded a large photo. Let me see what it looks like when I share it, via the “share link” button
Yeah that’s kind of an annoying URL because it gives no indication it is a picture. If I click on the picture, then right click and select “copy link” I get
e.g. the same thing… we’d have to code in custom support for this because those URLs don’t look like typical images of any sort, e.g.
https://example.com/picture.jpg
My apologies; I don’t see any easy way around this at the moment, even the usual “add .jpg to the end” doesn’t really work. It’s a shame Amazon chose such a weird way to implement this!
As a semi-complete aside, @elfkin477, may I say that Poe was an absolutely adorable kitten (made me go “awww!” with grabby hands) and has become a stunningly gorgeous cat.
Yes it does look like this is the case. Turns out we merged the previous change a while ago, so Discourse properly looks at the content-type of the URL regardless of what the URL looks like, e.g. https://example.com/image.jpg.
The SD poster is saying that it works about 50% of the time. I’d be willing to make a bet that Amazon has some stuff going on in their backend that tracks the groupShareToken such that it is only valid for a limited period of time/views and/or IP locked, etc.
Basically: I seems as though Amazon is trying to tell us it doesn’t want to be a service that hosts images for you to embed directly in to other sites.
I tried a bunch of ways of generating “image links” and none of them work, so I think Amazon is indeed saying they are not interested in being an image embedding service.
My guess is the one with the group share token is the way, but I don’t know how to generate that from my one photo that I have stored on Amazon photos.