Skip to content

Commit 60f3b40

Browse files
committed
New: add imageformat
1 parent f403f49 commit 60f3b40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Resources/Private/Fusion/Content.Video.fusion

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
55
class = ${PropTypes.anyOf( PropTypes.string, PropTypes.arrayOf( PropTypes.string ) )}
66
maximumWidth = ${PropTypes.integer}
77
loadImageStrategy = ${PropTypes.oneOf(['lazy', 'eager', null, false])}
8+
imageformat = ${PropTypes.oneOf(['jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm', 'webp', 'bmp'])}
89
wrapper = ${PropTypes.anyOf(PropTypes.string, PropTypes.boolean)}
910
image = ${PropTypes.instanceOf('Neos\Media\Domain\Model\ImageInterface')}
1011
async = ${PropTypes.boolean}
@@ -84,7 +85,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
8485

8586
// Internal
8687
[email protected] = ${this.metadata.videoID ? this.metadata.videoID : (value && this.platform ? Jonnitto.PrettyEmbedHelper.platformID(value, this.platform) : value)}
87-
_posterThumbnail = ${Jonnitto.PrettyEmbedHelper.createThumbnail(this.image || this.metadata.thumbnail, this.maximumWidth)}
88+
_posterThumbnail = ${Jonnitto.PrettyEmbedHelper.createThumbnail(this.image || this.metadata.thumbnail, this.maximumWidth, this.imageformat)}
8889
[email protected] = ${!this.content && (this.image || this.metadata.thumbnail)}
8990

9091
renderer = Neos.Fusion:Component {
@@ -122,6 +123,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
122123
renderer = Neos.Neos:ImageUri {
123124
asset = ${props.image || props.metadata.thumbnail}
124125
async = ${props.async}
126+
format = ${props.imageformat}
125127
maximumWidth = ${props.maximumWidth}
126128
}
127129
}
@@ -143,6 +145,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
143145
}
144146
asset = ${props.image || props.metadata.thumbnail}
145147
async = ${props.async}
148+
format = ${props.imageformat}
146149
maximumWidth = ${props.maximumWidth * 2}
147150
}
148151
href = Neos.Fusion:Case {

0 commit comments

Comments
 (0)