-
Notifications
You must be signed in to change notification settings - Fork 19
Commit aaa030f
authored
feat: Replace preload tags for related image source if exists (#55)
# Description
For each image, attempt to look up if that image has a preload tag
associated with it and replace the URL of that tag to avoid duplicate
image requests.
Active use case is Next.js App Router with the Next Image component.
## Issue Ticket Number
<!-- Specifiy which issue this fixes by referencing the issue number
(`#11`) or issue URL. -->
<!-- Example: Fixes
#1 -->
Fixes #54
## Type of change
<!-- Please select all options that are applicable. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
# Checklist
<!-- These must all be followed and checked. -->
- [ ] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [ ] I have created an
[issue](https://github.com/colbyfayock/netlify-plugin-cloudinary/issues)
ticket for this PR
- [ ] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/colbyfayock/netlify-plugin-cloudinary/pulls)
for the same update/change?
- [ ] I have performed a self-review of my own code
- [ ] I have run tests locally to ensure they all pass
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes needed to the documentation1 parent 46e6065 commit aaa030f
File tree
5 files changed
+86
-9
lines changed- demo
- app
- app
- pages
- src/lib
5 files changed
+86
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | - | ||
1 | + | ||
2 | + | ||
2 | 3 | | |
3 | 4 | | |
5 | + | ||
6 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | - | ||
12 | + | ||
13 | + | ||
14 | + | ||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | - | ||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
241 | + | ||
242 | 242 | | |
243 | + | ||
243 | 244 | | |
244 | 245 | | |
246 | + | ||
245 | 247 | | |
248 | + | ||
246 | 249 | | |
247 | - | ||
248 | - | ||
249 | - | ||
250 | - | ||
251 | - | ||
250 | + | ||
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | ||
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
259 | - | ||
262 | + | ||
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
266 | + | ||
263 | 267 | | |
268 | + | ||
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | ||
273 | + | ||
264 | 274 | | |
275 | + | ||
276 | + | ||
265 | 277 | | |
266 | 278 | | |
267 | 279 | | |
| |||
0 commit comments