Skip to content

feat(Books): auto-detect animated thumbnails and support pausing at p…#788

Open
jakeaturner wants to merge 1 commit into
stagingfrom
feat/pausable-images
Open

feat(Books): auto-detect animated thumbnails and support pausing at p…#788
jakeaturner wants to merge 1 commit into
stagingfrom
feat/pausable-images

Conversation

@jakeaturner
Copy link
Copy Markdown
Collaborator

…resentation time

@jakeaturner jakeaturner requested a review from ethanaturner May 7, 2026 22:38
Copy link
Copy Markdown
Member

@ethanaturner ethanaturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but see comment

Comment thread server/api/books.ts
try {
const headRes = await axios.head(book.thumbnail, { timeout: 5000 });
const contentType = headRes.headers["content-type"];
if (typeof contentType === "string" && contentType.includes("image/gif")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to also match against image/apng, image/avif, and image/webp to be safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants