You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After moving image files on my webserver to new URLs, Mastodon posts where I linked to pages that included those images are no longer showing them in the previews -- despite both updating og:image and creating HTTP redirects from the images' old URLs to their new ones.
Expected behaviour
Previews of images on my links should [continue] to appear
Actual behaviour
Previews of images on my links have all disappeared
Detailed description
Today on my webserver, I moved a large collection of image files from a single directory into subdirectories (e.g., "abc.png" went into "a/abc.png"; "xyz.jpg" went into "x/xyz.jpg").
Furthermore, for situations where someone or something (cough previews on posts made to Meta Threads) still expected to find the image at the original location, I have set up a 404 error handler on my webserver that detects the old URLs for these images (e.g., "/gallery/images/whatever.png"), and uses a Location: HTTP header to redirect to the new URL (e.g., "/gallery/images/w/whatever.png").
Unfortunately, when I look at my older posts to my Mastodon account, all of the link previews now show a generic "document" icon in a big great box, rather than a thumbnail of the og:image image. 😞
Steps to reproduce the problem
After moving image files on my webserver to new URLs, Mastodon posts where I linked to pages that included those images are no longer showing them in the previews -- despite both updating
og:image
and creating HTTP redirects from the images' old URLs to their new ones.Expected behaviour
Previews of images on my links should [continue] to appear
Actual behaviour
Previews of images on my links have all disappeared
Detailed description
Today on my webserver, I moved a large collection of image files from a single directory into subdirectories (e.g., "abc.png" went into "a/abc.png"; "xyz.jpg" went into "x/xyz.jpg").
My pages that show these images, e.g., https://tuxpaint.org/gallery/image.php?i=ethans-death-and-taxes-by-reddit-crankgameplays.png, have been update to not only use the correct path in the
<img src>
tag, but the<meta property="og:image" ...>
has as well.Furthermore, for situations where someone or something (cough previews on posts made to Meta Threads) still expected to find the image at the original location, I have set up a 404 error handler on my webserver that detects the old URLs for these images (e.g., "/gallery/images/whatever.png"), and uses a
Location:
HTTP header to redirect to the new URL (e.g., "/gallery/images/w/whatever.png").Unfortunately, when I look at my older posts to my Mastodon account, all of the link previews now show a generic "document" icon in a big great box, rather than a thumbnail of the
og:image
image. 😞Example: https://floss.social/@tuxpaint/112312826625820531
Compare to a more recent post (after I had moved the images into subdirectories): https://floss.social/@tuxpaint/112370349577998010
Mastodon instance
floss.social
Mastodon version
v4.2.8
Browser name and version
Chrome 124.0.6367.91
Operating system
Ubuntu 22.04.4
Technical details
No response
The text was updated successfully, but these errors were encountered: