Skip to content

Let width and height fill in a resize the type created - #72

Open
Joker666 wants to merge 1 commit into
docs/release-notesfrom
fix/width-height-resize
Open

Let width and height fill in a resize the type created#72
Joker666 wants to merge 1 commit into
docs/release-notesfrom
fix/width-height-resize

Conversation

@Joker666

@Joker666 Joker666 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Stack (merge bottom-up)

  1. Restructure processing and service, and close the geometry compatibility gaps #66 Restructure processing and service, and close the geometry compatibility gaps
  2. Process animated sources frame by frame #67 Process animated sources frame by frame
  3. Add the imgproxy delivery layer #68 Add the imgproxy delivery layer
  4. Build the image on Debian trixie for libvips 8.16 #69 Build the image on Debian trixie for libvips 8.16
  5. Correct quality precedence and cache-hit header consistency #70 Correct quality precedence and cache-hit header consistency
  6. Bring the remaining docs up to date #71 Bring the remaining docs up to date
  7. Let width and height fill in a resize the type created #72 Let width and height fill in a resize the type created
  8. Close the roadmap's remaining known gaps #73 Close the roadmap's remaining known gaps
  9. Implement the Pro options that were only ever cheap #74 Implement the Pro options that were only ever cheap
  10. Run the pipeline in imgproxy's stage order #75 Run the pipeline in imgproxy's stage order

Each PR targets the one before it, so its diff shows only its own change. Together they make up the 0.18.0 release.

Stacked on #71.

resizing_type:fill/width:300/height:200 failed with "resize requires at least one non-zero dimension".

width and height were kept in their own fields and reconciled into a resize only when none existed — and resizing_type creates one as a side effect, so the reconciliation never ran. They now write into the resize directly, which is how imgproxy has always modelled them: one target, whichever directive names it. A later width overrides an earlier one whichever form set it.

Also: a resizing type with no dimensions describes no target, so resize:fill on its own now returns the image unresized instead of failing at processing time. imgproxy does the same.

Validation

cargo fmt -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all -- --test-threads=1

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f752223278

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// which is what asking for a resizing type without a size means.
if parsed
.resize
.is_some_and(|resize| resize.width == 0 && resize.height == 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the resize type until client hints are applied

When client hints are enabled and the URL specifies resizing_type:fill or resize:fill without dimensions, this cleanup runs before apply_client_hints (src/service/mod.rs lines 140-149) and removes the explicit type. A Width header then takes the None branch in src/negotiation.rs lines 136-143 and constructs a Fit resize, so the request silently uses fit instead of the requested fill; previously the hint supplied the missing width on the retained Fill. Defer this cleanup until after client hints or preserve the requested type when constructing the hinted resize.

Useful? React with 👍 / 👎.

Comment thread doc/1_installation.md
sudo apt-get install -y build-essential pkg-config libvips-dev libvips openssl ca-certificates
# Debian ships libheif's codecs separately; without these, AVIF and HEIF
# output is reported as unsupported rather than encoded.
sudo apt-get install -y libheif-plugin-aomenc libheif-plugin-x265 libheif-plugin-dav1d libheif-plugin-libde265

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict split HEIF packages to releases that provide them

On Ubuntu 22.04 and Debian 12—both compatible with the documented libvips 8.12+ minimum—these split libheif-plugin-* packages are unavailable because those releases bundle the codecs differently, so this unconditional apt-get install exits nonzero and prevents the documented native installation. Limit this command to releases such as Ubuntu 24.04/Debian trixie that provide the split packages, or document release-appropriate package sets.

Useful? React with 👍 / 👎.

@Joker666

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: a3231f24e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Joker666
Joker666 force-pushed the fix/width-height-resize branch from a3231f2 to 4ffd0b2 Compare August 17, 2026 05:05
@Joker666

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ffd0b2940

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread doc/1_installation.md Outdated
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| Rust toolchain | 1.90 | Install via [rustup](https://rustup.rs/). Ensure `cargo`, `rustc`, and `rustfmt` are on your `PATH`. |
| libvips | 8.12+ | Provides the core image processing primitives. Both development headers and runtime libraries are required. |
| libvips | 8.12+ | Provides the core image processing primitives. Both development headers and runtime libraries are required. 8.16+ is recommended and is what the published image ships: AVIF and HEIF encoding and `preserve_hdr`'s gain map all depend on it. Older versions work, losing those. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Separate codec availability from the 8.16 gain-map requirement

For native installations using libvips 8.12–8.15 with the appropriate AV1 or HEVC encoder, this incorrectly says AVIF and HEIF encoding are unavailable: CHANGELOG.md lines 257–270 records that the 8.15 save-path problem was fixed and that AVIF is unaffected by missing HEVC support, while doc/5_processing_options.md lines 239–247 correctly makes codec availability build-dependent and reserves the 8.16 requirement for gain-map retention. This may cause users who need AVIF/HEIF output to perform an unnecessary libvips upgrade; limit the 8.16 statement to preserve_hdr gain maps and describe codec support separately.

Useful? React with 👍 / 👎.

@Joker666
Joker666 force-pushed the fix/width-height-resize branch from 4ffd0b2 to f109396 Compare August 21, 2026 03:53
@Joker666

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f109396982

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Joker666
Joker666 force-pushed the fix/width-height-resize branch from f109396 to d5e4f76 Compare August 21, 2026 06:26
@Joker666

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: d5e4f76e6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Joker666
Joker666 force-pushed the fix/width-height-resize branch from d5e4f76 to c5d80ea Compare August 21, 2026 19:03
@Joker666

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: c5d80ea8f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Joker666
Joker666 force-pushed the fix/width-height-resize branch from c5d80ea to 00f1f83 Compare August 21, 2026 21:13
@Joker666
Joker666 force-pushed the fix/width-height-resize branch 2 times, most recently from 4e922a9 to fdbae8f Compare August 21, 2026 23:44
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from fdbae8f to f568989 Compare August 21, 2026 23:53
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from f568989 to d9f4de8 Compare August 21, 2026 23:59
@Joker666
Joker666 force-pushed the fix/width-height-resize branch 2 times, most recently from 82cd523 to 87c12f6 Compare August 22, 2026 00:26
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from 87c12f6 to e6f5104 Compare August 22, 2026 00:36
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from e6f5104 to 82a4f3f Compare August 22, 2026 00:43
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from 82a4f3f to 2662631 Compare August 22, 2026 00:52
@Joker666
Joker666 force-pushed the fix/width-height-resize branch 2 times, most recently from 317bbf0 to d835e25 Compare August 22, 2026 01:12
resizing_type:fill/width:300/height:200 failed with "resize requires at
least one non-zero dimension". width and height were kept in their own
fields and reconciled into a resize only when none existed, and
resizing_type creates one as a side effect, so the reconciliation never
ran. They now write into the resize directly, which is how imgproxy has
always modelled them: one target, whichever directive names it.

A resizing type with no dimensions describes no target, so that case now
returns the image unresized instead of failing at processing time.
@Joker666
Joker666 force-pushed the fix/width-height-resize branch from d835e25 to 6d0d55a Compare August 22, 2026 01:23
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