Skip to content

[6.x] Fix Glide throwing when proc_open is disabled - #15334

Merged
jasonvarga merged 2 commits into
6.xfrom
fix/ffmpeg-proc-open-regression
Sep 1, 2026
Merged

[6.x] Fix Glide throwing when proc_open is disabled#15334
jasonvarga merged 2 commits into
6.xfrom
fix/ffmpeg-proc-open-regression

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

Description of the Problem

#15291 fixed video thumbnails showing as broken images when ffmpeg isn't installed, but introduced a regression on hosts where proc_open is disabled. ImageGenerator::generateByAsset() checked ThumbnailExtractor::available() && $asset->isVideo(), and PHP evaluates conditions left to right — so ffmpeg detection (which shells out via Symfony Process) ran for every image request, not just videos. With proc_open disabled, that threw a LogicException and broke all Glide requests, including plain JPEGs.

Reported in #15291 (comment).

What this PR Does

  • Reorders the check to $asset->isVideo() && ThumbnailExtractor::available() so non-video assets never trigger ffmpeg detection
  • Makes Ffmpeg::resolveFfmpegBinary() bail out gracefully when proc_open is unavailable, so even video assets fall back to the file icon instead of throwing

generateByAsset() checked ffmpeg availability before checking if the
asset was a video, so every image request (not just videos) triggered
ffmpeg detection via Symfony Process. On hosts with proc_open disabled
this threw a LogicException instead of just serving the image.

Also makes Ffmpeg binary resolution fail gracefully when proc_open is
unavailable, so video assets fall back to the file icon instead of
throwing.
The proc_open guard only covered ffmpeg auto-discovery, not an
explicitly configured statamic.assets.ffmpeg.binary. With a configured
binary and proc_open disabled, available() still reported true and
extractThumbnail() threw when it shelled out to run ffmpeg.
@jasonvarga
jasonvarga merged commit 4552359 into 6.x Sep 1, 2026
64 checks passed
@jasonvarga
jasonvarga deleted the fix/ffmpeg-proc-open-regression branch September 1, 2026 18:03
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