Comment on xkcd #3090: Sail Physics
Deebster@infosec.pub 1 day agoIf you upload an image, the URL field is populated with the URL of the uploaded image, so there’s not really multiple fields like it appears.
I can definitely change the template, although I won’t edit the bot before the next comic which might be any second now.
who@feddit.org 1 day ago
Sure enough; I just discovered this for myself when running some tests. I also noticed that Lemmy offers an Alt Text field, which it looks like the bot is already populating.
Test 1 : The URL field and the image attachment field were used; the latter overwrites whatever is placed in the former. I guess this might be modeled after Reddit.
Test 2: A direct link to the image at xkcd.com was placed in the URL field, and the source link placed at the top of the body. Result: This is similar to the bot’s current format, including the flaw that a desktop browser with strict privacy settings won’t show the comic image as part of the post when the thumbnail is clicked, because it’s an off-site image. Having the source link at the top of the body does at least make it a little more convenient to click through to xkcd.com’s single-page view.
Test 3: Only the image attachment field was used; the URL field was left blank. Result: This allows a desktop browser to show the comic image in-line when the thumbnail is clicked, even with strict browser privacy settings, because it’s an attached image hosted on the local Lemmy instance rather than an off-site link. The source link was again placed at the top of the body. Result: Best of the three tests, I think.
(Side note: I used m.xkcd.com links instead of plain xkcd.com links in these tests, just to see how the mobile site looks in different browsers. In practice, either ought to work.)
If you decide not to start populating the URL field with a link to the xkcd.com source page, I think the approach in Test 3 would be the next best thing. (At least, based on what I have found to be possible so far.)