Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform via URL background supported values appears incorrect #15445

Closed
cdubz opened this issue Jul 2, 2024 · 0 comments
Closed

Transform via URL background supported values appears incorrect #15445

cdubz opened this issue Jul 2, 2024 · 0 comments
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:images Related to Image Resizing product

Kommentare

@cdubz
Copy link

cdubz commented Jul 2, 2024

Existing documentation URL(s)

https://developers.cloudflare.com/images/transform-images/transform-via-url/#background

What changes are you suggesting?

The documentation says:

Background color to add underneath the image. Applies to images with transparency (for example, PNG) and images resized with fit=pad. Accepts any CSS color, such as #RRGGBB and rgba(…).

(emphasis mine)

The background value doesn't appear to accept any CSS color. I tested with MDN documented <color> and <hex-color> values. From my testing it seems that actual supported values are:

  • Named colors
  • transparent
  • Three-value hex (#RGB)
  • Six-value hex (#RRGGBB)

When I try other formats I get either ERROR 9401: Missing or invalid resizing parameters: Error parsing background color: ColorParseError: Invalid format or just malformed URL (with a cf-images header value of err=9401)

Zusätzliche Informationen

No response

@cdubz cdubz added content:edit Request for content edits documentation Documentation edits labels Jul 2, 2024
@github-actions github-actions bot added the product:images Related to Image Resizing product label Jul 2, 2024
@dcpena dcpena closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:images Related to Image Resizing product
Projects
None yet
Development

No branches or pull requests

4 participants