Skip to content

Commit e147e1a

Browse files
authored
Update docs for image placeholders to use Unsplash (#184)
1 parent 74ccfe9 commit e147e1a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

docs/guides/overriding-template-tags.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ content defined in `patterns/atoms/images/image.yaml`.
161161
The downside of this approach is that we render the
162162
same template where an image can be rendered in a different size.
163163
So, if `patterns/atoms/images/image.html` has something like
164-
`<img src="http://via.placeholder.com/200x200" width="200" height="200" alt="Placeholder">`
164+
`<img src="https://source.unsplash.com/200x200?ocean" width="200" height="200" alt="">`
165165
inside, this means that we will render image of size `200x200` few times.
166166

167167
Probably, in the majority of cases, it's ok to render the same
@@ -194,11 +194,11 @@ tags:
194194
# Override {% image avatar fill-200x200 %}
195195
avatar fill-200x200:
196196
raw: >
197-
<img src="http://via.placeholder.com/200x200" width="200" height="200" alt="Placeholder">
197+
<img src="https://source.unsplash.com/200x200?ocean" width="200" height="200" alt="">
198198
# Override {% image avatar fill-200x400 %}
199199
avatar fill-200x400:
200200
raw: >
201-
<img src="http://via.placeholder.com/200x400" width="200" height="400" alt="Placeholder">
201+
<img src="https://source.unsplash.com/200x400?ocean" width="200" height="400" alt="">
202202
203203
# Override context, if needed
204204
```
@@ -233,7 +233,7 @@ tags:
233233
avatar fill-200x200 as avatar_thumbnail:
234234
raw:
235235
file: "/path/to/avatar/file"
236-
url: "http://via.placeholder.com/200x200"
236+
url: "https://source.unsplash.com/200x200?ocean"
237237
```
238238
239239
Note that the example above will only work if our `image` is a
@@ -249,7 +249,7 @@ tags:
249249
target_var: avatar_thumbnail
250250
raw:
251251
file: "/path/to/avatar/file"
252-
url: "http://via.placeholder.com/200x200"
252+
url: "https://source.unsplash.com/200x200?ocean"
253253
```
254254

255255
Note the `target_var` field.

docs/recipes/image-include.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Image include
22

3+
To create test cases for images, we recommend using an image hotlinking service like [Unsplash](https://unsplash.com/) or [placeholder.com](https://placeholder.com/).
4+
35
```jinja2
46
<img src="{{ imageSmall.url }}" data-src="{{ imageLarge.url }}" width="{{ width }}" height="{{ height }}" alt="{{ imageLarge.alt }}" class="{{ classList }} lazyload">
57
```

docs/recipes/image-lazyload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ tags:
1313
slide.image fill-100x71 as imageSmall:
1414
target_var: imageSmall
1515
raw:
16-
url: '//placekitten.com/100/71'
16+
url: 'https://source.unsplash.com/100x71?ocean'
1717
slide.image fill-829x585 as imageLarge:
1818
target_var: imageLarge
1919
raw:
20-
url: '//placekitten.com/829/585'
20+
url: 'https://source.unsplash.com/829x585?ocean'
2121
width: '829'
2222
height: '585'
2323
```

0 commit comments

Comments
 (0)