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 9a14550 commit 8b098a8
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.PrettyEmbedVideo:Content.Video) < prototype(Jonnitto.PrettyEm
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'])}
width = ${PropTypes.integer}
height = ${PropTypes.integer}
image = ${PropTypes.instanceOf('Neos\Media\Domain\Model\ImageInterface')}
Expand Down Expand Up @@ -82,7 +83,7 @@ prototype(Jonnitto.PrettyEmbedVideo:Content.Video) < prototype(Jonnitto.PrettyEm
}

// 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 @@ -103,6 +104,7 @@ prototype(Jonnitto.PrettyEmbedVideo:Content.Video) < prototype(Jonnitto.PrettyEm
renderer = Neos.Neos:ImageUri {
asset = ${props.image}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth}
}
}
Expand All @@ -116,6 +118,7 @@ prototype(Jonnitto.PrettyEmbedVideo:Content.Video) < prototype(Jonnitto.PrettyEm
}
asset = ${props.image}
async = ${props.async}
format = ${props.imageformat}
maximumWidth = ${props.maximumWidth * 2}
}
assets = Neos.Fusion:Loop {
Expand Down

0 comments on commit 8b098a8

Please sign in to comment.