Skip to content

Commit

Permalink
[FEATURE] Force image file format TS constant
Browse files Browse the repository at this point in the history
  • Loading branch information
t3brightside committed Apr 22, 2023
1 parent 4052955 commit ece9c71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Configuration/TypoScript/constants.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ youtubevideo.partialRootPaths = EXT:youtubevideo/Resources/Private/Partials/
youtubevideo.cssFile = EXT:youtubevideo/Resources/Public/Css/youtubevideo.css
# cat=Youtubevideo/1; type=boolean[1]; label= CSS file priority, 0 means CSS is loaded in page footer
youtubevideo.cssPriority = 1
# cat=Youtubevideo/1; type=sting; label= Force image file format (make sure it's enabled in [GFX][imagefile_ext])
youtubevideo.forceImageFileFormat =
1 change: 1 addition & 0 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ tt_content {
ccsPriority = {$youtubevideo.cssPriority}
coverimagewidth = {$youtubevideo.coverimagewidth}
colspacewidth = {$youtubevideo.colspacewidth}
forceImageFileFormat = {$youtubevideo.forceImageFileFormat}
}
variables {
# language code use de, fr, et etc.
Expand Down
3 changes: 2 additions & 1 deletion Resources/Private/Partials/Item.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
treatIdAsReference="1"
width="{coverImageWidth_x2}"
cropVariant="{f:if(condition: item.settings.ratio, then: 'tv', else: 'widescreen')}"
fileExtension="{settings.forceImageFileFormat}"
/>
</f:then>
<f:else>
<f:uri.image src="{item.original.preview}" width="{coverImageWidth_x2}" />
<f:uri.image src="{item.original.preview}" width="{coverImageWidth_x2}" fileExtension="{settings.forceImageFileFormat}" />
</f:else>
</f:if>
) center center no-repeat; background-size: cover;">
Expand Down

0 comments on commit ece9c71

Please sign in to comment.