-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add srcPrefix (data-*) to support edge cases when loading="…
…lazy"is not enough.
- Loading branch information
1 parent
2622749
commit 2331ffc
Showing
8 changed files
with
113 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...unctional/Frontend/Fixtures/Templates/SimpleImageWithRetinaAndWebpAndSrcPrefixOption.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html | ||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" | ||
xmlns:i="http://typo3.org/ns/B13/Picture/ViewHelpers" | ||
data-namespace-typo3-fluid="true" | ||
> | ||
<f:spaceless> | ||
<i:image src="EXT:picture/Resources/Public/Test/Picture.png" width="400" useRetina="1" addWebp="1" srcPrefix="1" alt="Testimage 400px width with retina and addWebp and srcPrefix" /> | ||
</f:spaceless> |
8 changes: 8 additions & 0 deletions
8
Tests/Functional/Frontend/Fixtures/Templates/SimpleImageWithSrcPrefix.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html | ||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" | ||
xmlns:i="http://typo3.org/ns/B13/Picture/ViewHelpers" | ||
data-namespace-typo3-fluid="true" | ||
> | ||
<f:spaceless> | ||
<i:image src="EXT:picture/Resources/Public/Test/Picture.png" width="400" srcPrefix="1" alt="Testimage 400px width and srcPrefix" /> | ||
</f:spaceless> |
13 changes: 13 additions & 0 deletions
13
.../Functional/Frontend/Fixtures/simple_image_with_retina_and_webp_and_src_prefix_option.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"pages" | ||
,"uid","pid","title","slug" | ||
,1,0,"root","/" | ||
"sys_template" | ||
,"uid","pid","root","constants","config" | ||
,1,1,1,styles.content.image.lazyLoading=lazy,"@import 'EXT:picture/Configuration/TypoScript/test.typoscript' | ||
page = PAGE | ||
page.config.disableAllHeaderCode = 1 | ||
page.10 = FLUIDTEMPLATE | ||
page.10.templateRootPaths.10 = EXT:picture/Tests/Functional/Frontend/Fixtures/Templates | ||
page.10.templateName = SimpleImageWithRetinaAndWebpAndSrcPrefixOption.html | ||
config.absRefPrefix = / | ||
" |
13 changes: 13 additions & 0 deletions
13
Tests/Functional/Frontend/Fixtures/simple_image_with_src_prefix.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"pages" | ||
,"uid","pid","title","slug" | ||
,1,0,"root","/" | ||
"sys_template" | ||
,"uid","pid","root","constants","config" | ||
,1,1,1,styles.content.image.lazyLoading=lazy,"@import 'EXT:picture/Configuration/TypoScript/test.typoscript' | ||
page = PAGE | ||
page.config.disableAllHeaderCode = 1 | ||
page.10 = FLUIDTEMPLATE | ||
page.10.templateRootPaths.10 = EXT:picture/Tests/Functional/Frontend/Fixtures/Templates | ||
page.10.templateName = SimpleImageWithSrcPrefix.html | ||
config.absRefPrefix = / | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters