Skip to content

Commit cf0d0b1

Browse files
committed
feat: added more info on the raster component
1 parent 2a090ce commit cf0d0b1

1 file changed

Lines changed: 33 additions & 19 deletions

File tree

apps/site/pages/components/raster.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,33 @@ title: Raster
33
---
44

55

6+
The image component permits to transform, render and supports multiple screen (responsive image).
7+
It's backed up by a image processing service for on the fly transformation.
8+
9+
## Features
10+
11+
* No image stretch: final width and height values never go above the image intrinsic size.
12+
* [Ratio property support](#dimension-properties)
13+
* [Crop support with fit attribute](#dimension-properties)
14+
* Automatic [compression](#compression-properties)
15+
* Responsive by default
16+
* [Fallback image](#image-component-error)
17+
18+
## Syntax
19+
20+
```markdown
21+
<Raster src="card_puncher_data_processing.jpg" alt="Card Puncher" height="300" ratio="16:9"/>
22+
```
23+
24+
will output:
25+
626
<Raster src="card_puncher_data_processing.jpg" alt="Card Puncher" height="300" ratio="16:9"/>
727

28+
### Properties
829

9-
## Raster Component
30+
You will fine all possible properties below.
31+
32+
##### Dimension Properties
1033

1134
| Name | Default | Possible values | Description |
1235
|--------|---------|------------------|----------------------------------------------------------------|
@@ -15,7 +38,7 @@ title: Raster
1538
| Height | | Postiive Integer | The requested height in pixel |
1639
| Ratio | | `number:number` | The requested ratio (Most common: `21:9`,`16:9`, `4:3`, `1:1`) |
1740

18-
## Transformation Properties
41+
##### Transformation Properties
1942

2043
| Name | Default | Possible values | Description |
2144
|-------------|---------|-------------------------------------------------|--------------------------------------------------------------|
@@ -27,14 +50,15 @@ More:
2750
* A `fluid` image will scale down to fit the container, maintaining the aspect ratio.
2851
* [Fit explanation](https://sharp.pixelplumbing.com/api-resize/#resize)
2952

30-
## Features
53+
#### Compression Properties
3154

32-
* No image stretch: final width and height values never go above the image intrinsic size.
33-
* Automatic compression
34-
* Responsive by default
35-
* Ratio support
36-
* Fallback image
37-
* Crop support with fit attribute
55+
| Level | Quality Level | Description |
56+
|-------|---------------|------------------------------------------------------------------------------------------------------|
57+
| none | | No compression applied; original image data is preserved exactly as-is |
58+
| low | 90 | Minimal compression with negligible quality loss; best for archival or print use |
59+
| mid | 80 | Balanced compression reducing file size by ~50% with minimal visible quality impact |
60+
| high | 60 | Aggressive compression prioritizing small file size over image fidelity |
61+
| max | 40 | Maximum compression; significantly reduced quality, optimized for bandwidth-constrained environments |
3862

3963
## Error handling
4064

@@ -56,7 +80,6 @@ width="-1"
5680
/>
5781
```
5882

59-
6083
### Transformation Service Error
6184

6285
In case of error, the transformation service will:
@@ -81,12 +104,3 @@ You can enable DPI correction for responsive image.
81104
This can be disturbing when debugging responsive sizing image
82105
If you want also to use less bandwidth, this is also useful.
83106

84-
## Compression
85-
86-
| Level | Quality Level | Description |
87-
|-------|---------------|------------------------------------------------------------------------------------------------------|
88-
| none | | No compression applied; original image data is preserved exactly as-is |
89-
| low | 90 | Minimal compression with negligible quality loss; best for archival or print use |
90-
| mid | 80 | Balanced compression reducing file size by ~50% with minimal visible quality impact |
91-
| high | 60 | Aggressive compression prioritizing small file size over image fidelity |
92-
| max | 40 | Maximum compression; significantly reduced quality, optimized for bandwidth-constrained environments |

0 commit comments

Comments
 (0)