Skip to content

Commit

Permalink
New: add imageformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Dec 15, 2023
1 parent f403f49 commit 60f3b40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/Private/Fusion/Content.Video.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
class = ${PropTypes.anyOf( PropTypes.string, PropTypes.arrayOf( PropTypes.string ) )}
maximumWidth = ${PropTypes.integer}
loadImageStrategy = ${PropTypes.oneOf(['lazy', 'eager', null, false])}
imageformat = ${PropTypes.oneOf(['jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm', 'webp', 'bmp'])}
wrapper = ${PropTypes.anyOf(PropTypes.string, PropTypes.boolean)}
image = ${PropTypes.instanceOf('Neos\Media\Domain\Model\ImageInterface')}
async = ${PropTypes.boolean}
Expand Down Expand Up @@ -84,7 +85,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto

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

renderer = Neos.Fusion:Component {
Expand Down Expand Up @@ -122,6 +123,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
renderer = Neos.Neos:ImageUri {
asset = ${props.image || props.metadata.thumbnail}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth}
}
}
Expand All @@ -143,6 +145,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
}
asset = ${props.image || props.metadata.thumbnail}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth * 2}
}
href = Neos.Fusion:Case {
Expand Down

0 comments on commit 60f3b40

Please sign in to comment.