Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the largest thumbnail size in the resource meta file. #35

Open
wants to merge 5 commits into
base: enh/DEL-108-static-page-mdx
Choose a base branch
from

Conversation

funkydunc
Copy link
Contributor

Made extract-copy-local.js which is a local copy of extract-thumbnail.js from headless-static-site.
Tweaked this to request the thumbnail closest to 1080x1080 (recommended for og:image), with a fallback of 256x256 which is what was previously used to populate the meta file.

Exhibition
<meta property="og:image" content="https://dlc.services/thumbs/7/24/14204410-74cc-5796-04f2-a59eeaa8ab44/full/1024,/0/default.jpg"/><meta property="og:image:width" content="1024"/><meta property="og:image:height" content="563"/>

Object
<meta property="og:image" content="https://dlc.services/thumbs/7/18/4045ba8b-2160-40b4-9a4b-ae2235280f3d/full/1024,/0/default.jpg"/><meta property="og:image:width" content="1024"/><meta property="og:image:height" content="683"/>

Publication
<meta property="og:image" content="https://dlc.services/thumbs/7/21/b65dbfcc-4daf-0b7d-86fc-74a126248b03/full/full/0/default.jpg"/><meta property="og:image:width" content="1080"/>

@funkydunc funkydunc changed the base branch from main to enh/DEL-108-static-page-mdx January 21, 2025 17:00
@funkydunc funkydunc added the deploy-preview PRs tagged with this will deploy a Netlify preview URL label Jan 21, 2025
@funkydunc funkydunc requested a review from stephenwf January 21, 2025 17:03
Copy link

Netlify output

Static site (preview): https://deploy-preview-35--heritage-tudelft.netlify.app
IIIF (preview): https://deploy-preview-35--delft-iiif.netlify.app
IIIF Collection (preview): Theseus

@sammeltassen
Copy link
Collaborator

Neat! This works really well (now previews appear when sharing on iMessage and Whatsapp; the previous thumb was too small). Not sure if this is related to this PR but the url tags starts with http://localhost:3000/....

@funkydunc
Copy link
Contributor Author

Not sure if this is related to this PR but the url tags starts with http://localhost:3000/....

This is resolved now (It was an incorrect environment variable used for the metadata base url)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-preview PRs tagged with this will deploy a Netlify preview URL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants