Skip to content

Comments

docs: update docs for 1.1.0#33

Merged
imsus merged 1 commit intomainfrom
docs/update-1.1.0
Jan 2, 2026
Merged

docs: update docs for 1.1.0#33
imsus merged 1 commit intomainfrom
docs/update-1.1.0

Conversation

@imsus
Copy link
Owner

@imsus imsus commented Jan 2, 2026

No description provided.

@imsus imsus self-assigned this Jan 2, 2026
@imsus imsus added the documentation Improvements or additions to documentation label Jan 2, 2026
@imsus imsus merged commit e0f16c0 into main Jan 2, 2026
1 check passed
@imsus imsus deleted the docs/update-1.1.0 branch January 2, 2026 11:00
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @imsus, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on updating the project's documentation to align with the new 1.1.0 release. The core change is the introduction of a more fluent and readable API for image URL generation, simplifying method calls and adding new features like cache busting and fallback URLs. The updates ensure that users have clear guidance on leveraging the latest capabilities while maintaining compatibility with existing implementations.

Highlights

  • Fluent API Introduction: The documentation has been updated to reflect a new, more concise fluent API, replacing set*() methods (e.g., setWidth()) with shorter aliases (e.g., width()).
  • New Fluent Shortcuts: Convenient shortcut methods have been added for common operations, including resize types (cover(), contain(), fill()) and output formats (webp(), avif(), png(), jpg()).
  • Cache Busting Feature: New documentation has been added for the v() method, allowing users to easily invalidate cached images.
  • Fallback URL Support: The documentation now includes details on how to set a global or per-request fallback image URL for missing or invalid source images.
  • Configuration Updates: New configuration options use_short_options and fallback_url have been added to the API reference, along with explanations and examples.
  • Backward Compatibility Clarification: The documentation explicitly states that the older set*() methods remain fully supported, allowing for a gradual transition to the new fluent API.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of updating the documentation to use the new fluent API, making the examples more concise and readable. I've found a few inconsistencies between the documentation and the source code that should be addressed. Specifically, the documentation refers to processing() and fill() methods which appear to be named setProcessing() and fillDown() respectively in the code. There are also a couple of code examples with invalid syntax. I've left detailed comments on these points. After these fixes, the documentation will be in excellent shape.

```php
$url = imgproxy('https://example.com/image.jpg')
->setProcessing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
->processing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The documentation is updated to use ->processing(), but this method does not seem to exist in the ImgProxy class. The existing method is setProcessing(). Please either add the processing() alias method if it was missed, or update the documentation to use setProcessing().

Suggested change
->processing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
->setProcessing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')

```php
$url = imgproxy('https://example.com/image.jpg')
->setProcessing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
->processing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The example uses ->processing(), but this method does not appear to exist in the ImgProxy class. The correct method is setProcessing(). This is also inconsistent with the API reference tables in this document. Please correct the example and ensure the API tables are accurate.

Suggested change
->processing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')
->setProcessing('rs:fill:400:300:1/rt:fit/q:85/bl:2.0')

->setResizeType(ResizeType::FORCE)
->width(300)
->height(200)
->fill()
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The documentation uses ->fill() for the fill-down resize type. However, the method in the ImgProxy class is fillDown(). Please correct the method name in the example.

Suggested change
->fill()
->fillDown()

Comment on lines +83 to +85
->avif() // Output as AVIF
->png() // Output as PNG
->jpg() // Output as JPEG
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This code block contains invalid PHP syntax. The lines starting with -> are not valid statements on their own, which could be confusing. Please consider rewriting this to be a valid code snippet or using a list format for clarity.

Suggested change
->avif() // Output as AVIF
->png() // Output as PNG
->jpg() // Output as JPEG
// ->avif() // Output as AVIF
// ->png() // Output as PNG
// ->jpg() // Output as JPEG

Comment on lines +100 to +101
->contain() // Fit within area (ResizeType::FIT)
->fill() // Force dimensions (ResizeType::FILL_DOWN)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This example has two issues:

  1. The lines starting with -> are not valid PHP statements.
  2. The method ->fill() is used, but the correct method is ->fillDown().

Please correct the example for clarity and accuracy.

Suggested change
->contain() // Fit within area (ResizeType::FIT)
->fill() // Force dimensions (ResizeType::FILL_DOWN)
// ->contain() // Fit within area (ResizeType::FIT)
// ->fillDown() // Force dimensions (ResizeType::FILL_DOWN)

| `jpg()` | - | Output as JPEG |
| `cover()` | - | Set resize type to fill |
| `contain()` | - | Set resize type to fit |
| `fill()` | - | Set resize type to fill-down |
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The method for the fill-down resize type is fillDown(), not fill(). Please correct the method name in this table.

Suggested change
| `fill()` | - | Set resize type to fill-down |
| `fillDown()` | - | Set resize type to fill-down |

|------------|---------------|-------------|
| `FIT` | `contain()` | Resize keeping aspect ratio to fit within dimensions (default) |
| `FILL` | `cover()` | Resize keeping aspect ratio to fill dimensions, cropping overflow |
| `FILL_DOWN` | `fill()` | Same as fill, but maintains aspect ratio for smaller images |
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The fluent method for FILL_DOWN is fillDown(), not fill(). Please correct the method name in the table.

Suggested change
| `FILL_DOWN` | `fill()` | Same as fill, but maintains aspect ratio for smaller images |
| `FILL_DOWN` | `fillDown()` | Same as fill, but maintains aspect ratio for smaller images |

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant