You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/4.api/2.use-image.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,34 @@
2
2
aside: false
3
3
---
4
4
5
-
# $img utility
5
+
# `useImage` composable
6
6
7
-
Sometimes it's required to directly use a generated image URL with applied transformations instead of `<nuxt-img>` and `<nuxt-picture>` components. This is where `$img` comes in.
7
+
Sometimes you might need to use a generated image URL directly with applied transformations instead of the `<nuxt-img>` and `<nuxt-picture>` components. This is where `useImage()` comes in (and the helper function it returns, which you will often see referenced directly as `$img` or `img`).
8
8
9
9
## Usage
10
10
11
11
```js
12
-
const$img=useImage()
12
+
constimg=useImage()
13
13
14
-
$img(src, modifiers, options)
14
+
img(src, modifiers, options)
15
15
```
16
16
17
17
**Example:** Generate image URL for `backgroundImage` style.
0 commit comments