Skip to content

Commit 7ec3dcb

Browse files
deannalamOxyjun
authored andcommitted
Add hidden anchor IDs for aliased parameter headings
Parameters with aliases (format|f, gravity|g, height|h, quality|q, slow-connection-quality|scq, width|w, zoom|face-zoom) generate anchors like #quality--q, but existing links use #quality. Adding hidden <a> elements ensures both anchor formats work.
1 parent eabc124 commit 7ec3dcb

7 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/content/partials/images/format.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44

55
import { Tabs, TabItem} from "~/components";
66

7+
<a id="format"></a>
8+
79
### `format` | `f`
810

911
Specifies the output format for the image.
1012

1113
Accepts the following values:
1214

1315
- `auto` — Automatically serves the most efficient format that the requesting browser supports. When you serve a [hosted image](/images/optimization/hosted-images/create-variants/), this is the default `format` option.
14-
- `avif` — Transcodes the image to AVIF if possible (with WebP as a fallback).
16+
- `avif` — Transcodes the image to AVIF, if possible. AVIF encoding can be an order of magnitude slower than encoding to other formats. If the image is too large to be quickly encoded to AVIF, then Cloudflare will fall back to WebP or JPEG.
1517
- `webp` — Transcodes the image to Google WebP format. Use `quality=100` to return the WebP lossless format.
1618
- `jpeg` — Transcodes the image in interlaced progressive JPEG format, in which data is compressed in multiple passes of progressively higher detail.
1719
- `baseline-jpeg` — Transcode the image in baseline sequential JPEG format. It should be used in cases when target devices do not support progressive JPEG or other modern file formats.

src/content/partials/images/gravity.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import relPoints from "~/assets/images/images/examples/gravity/rel-points.png";
1717
import relAlignment from "~/assets/images/images/examples/gravity/rel-alignment.png";
1818
import relOutput from "~/assets/images/images/examples/gravity/rel-output.png";
1919

20+
<a id="gravity"></a>
21+
2022
### `gravity` | `g`
2123

2224
Specifies how the image should be cropped when used with `fit=cover` and `fit=crop`. By default, Cloudflare will crop toward the center point of the original image.

src/content/partials/images/height.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
---
44
import { Tabs, TabItem} from "~/components"
55

6+
<a id="height"></a>
7+
68
### `height` | `h`
79

810
Sets the height of the output image in pixels using a positive integer value. By default, Cloudflare uses the original height of the input image.

src/content/partials/images/quality.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import { Tabs, TabItem} from "~/components";
66

7+
<a id="quality"></a>
8+
79
### `quality` | `q`
810

911
Specifies the output quality of an image for JPEG, WebP, and AVIF formats, expressed as a fixed value or perceptual quality level. The default is `85`.

src/content/partials/images/slow-connection-quality.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import { Tabs, TabItem} from "~/components";
66

7+
<a id="slow-connection-quality"></a>
8+
79
### `slow-connection-quality` | `scq`
810

911
Overrides the `quality` value whenever a slow connection is detected. Accepts the same fixed or perceptual settings as [quality](/images/optimization/features/#quality). The default is none.

src/content/partials/images/width.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
---
44
import { Tabs, TabItem} from "~/components"
55

6+
<a id="width"></a>
7+
68
### `width` | `w`
79

810
Sets the width of the output image in pixels using a positive integer value. By default, Cloudflare uses the original width of the input image.

src/content/partials/images/zoom.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
---
44
import { Tabs, TabItem} from "~/components"
55

6+
<a id="zoom"></a>
7+
68
### `zoom` | `face-zoom`
79

810
Specifies how closely the image is cropped toward detected faces when combined with the `gravity=face` option. Accepts a valid range between `0.0` (includes as much of the background as possible) and `1.0` (crops the image as closely to the face as possible). The default is `0`.

0 commit comments

Comments
 (0)