Skip to content

Add video_thumbnail_keyframes support - #86

Merged
11bit merged 1 commit into
mainfrom
add-video-thumbnail-keyframes
Aug 21, 2026
Merged

Add video_thumbnail_keyframes support#86
11bit merged 1 commit into
mainfrom
add-video-thumbnail-keyframes

Conversation

@11bit

@11bit 11bit commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Adds the video_thumbnail_keyframes / vtk option (imgproxy Pro), which was documented but had no implementation in this package.

video_thumbnail_keyframes:%keyframes
vtk:%keyframes

When set to 1, t or true, imgproxy uses the latest keyframe before the requested second for video thumbnail generation. This makes thumbnail generation faster, but the frame timestamp will not be exactly the requested one. Redefines the IMGPROXY_VIDEO_THUMBNAIL_KEYFRAMES config. Default: false.

The option is documented for processing URLs and under ## Info options in the image-info docs — the same position as video_thumbnail_second, which this package already treats as shared. It therefore lives in optionsShared/typesShared and is wired into both generateUrl and generateImageInfoUrl.

Implementation notes

  • Follows the enforceThumbnail boolean pattern: test uses "key" in options, so an explicit false still emits vtk:f rather than being dropped.
  • Marked **PRO feature** in the typedocs on both the value type and the *OptionsPartial interface, matching videoThumbnailSecond and the rest of the Pro options.

Verification

  • tsc --noEmit clean, eslint src tests clean
  • vitest run → 98 files / 1106 tests passing (11 new)
  • End-to-end spot check: generateUrl(..., { width: 10, video_thumbnail_keyframes: true, video_thumbnail_second: 5 })/vtk:t/vts:5/w:10/plain/img; generateImageInfoUrl(..., { vtk: false })/vtk:f/plain/img

Relation to #85

Independent — branched from main, no overlap. Unlike bypass_cache/cache_tags in #85, vtk is already in the released 4.0.x docs, so it works against current imgproxy versions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo

Adds the `video_thumbnail_keyframes` (`vtk`) option. It is documented for
processing and image info URLs, so it lives in optionsShared/typesShared
and is wired into both generators.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo
@11bit
11bit merged commit 043d0b3 into main Aug 21, 2026
1 check passed
@11bit
11bit deleted the add-video-thumbnail-keyframes branch August 21, 2026 07:32
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.

1 participant