Skip to content

Fix VipsDriver save() without path and format() being ignored#321

Merged
freekmurze merged 2 commits into
mainfrom
fix/vips-save-without-path
Mar 1, 2026
Merged

Fix VipsDriver save() without path and format() being ignored#321
freekmurze merged 2 commits into
mainfrom
fix/vips-save-without-path

Conversation

@freekmurze

Copy link
Copy Markdown
Member

Summary

  • VipsDriver's save() now falls back to originalPath when called without a path, matching GdDriver and ImagickDriver behavior
  • VipsDriver's save() now respects the format property set via format(), instead of only looking at the path extension
  • Resets $this->format to null after saving, consistent with the other drivers

Fixes #320

freekmurze and others added 2 commits March 1, 2026 16:12
The VipsDriver was missing originalPath tracking and format fallback
logic that GdDriver and ImagickDriver both have. This caused save()
without a path to fail with "Unsupported format 'unknown'" and
format() calls to be ignored when determining the output format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@freekmurze freekmurze merged commit 13a8f14 into main Mar 1, 2026
11 checks passed
@freekmurze freekmurze deleted the fix/vips-save-without-path branch March 1, 2026 15:19
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