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 14724d0 commit 613c9d8
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 @@ -9,6 +9,7 @@ prototype(Jonnitto.PrettyEmbedVideoStreaming:Content.Video) < prototype(Jonnitto
maximumWidth = ${PropTypes.integer}
wrapper = ${PropTypes.anyOf(PropTypes.string, PropTypes.boolean)}
loadImageStrategy = ${PropTypes.oneOf(['lazy', 'eager', null, false])}
imageformat = ${PropTypes.oneOf(['jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm', 'webp', 'bmp'])}
streaming = ${PropTypes.string}
width = ${PropTypes.integer}
height = ${PropTypes.integer}
Expand Down Expand Up @@ -71,7 +72,7 @@ prototype(Jonnitto.PrettyEmbedVideoStreaming:Content.Video) < prototype(Jonnitto
}

// Internal
_posterThumbnail = ${Jonnitto.PrettyEmbedHelper.createThumbnail(this.image, this.maximumWidth)}
_posterThumbnail = ${Jonnitto.PrettyEmbedHelper.createThumbnail(this.image, this.maximumWidth, this.imageformat)}
[email protected] = ${this.image}

renderer = Neos.Fusion:Component {
Expand All @@ -92,6 +93,7 @@ prototype(Jonnitto.PrettyEmbedVideoStreaming:Content.Video) < prototype(Jonnitto
renderer = Neos.Neos:ImageUri {
asset = ${props.image}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth}
}
}
Expand All @@ -105,6 +107,7 @@ prototype(Jonnitto.PrettyEmbedVideoStreaming:Content.Video) < prototype(Jonnitto
}
asset = ${props.image}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth * 2}
}
}
Expand Down

0 comments on commit 613c9d8

Please sign in to comment.