Skip to content

How does fillTransforms [bool] work? #140

Answered by aelvan
StijnCoolen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

fillTransform and fillInterval are config settings, so you need to pass them through the fourth parameter of transformImage, try:

{% set transformedJpeg = craft.imager.transformImage(image, [{ width: 600 }, { width: 1000 }], { ratio: 16/9 }, { fillTransforms: true }) %}

Or you could of course set them in the imager-x.php config file to use fill by default. I usually do that, and instead disable it in the few cases where I don't want to fill transforms.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@StijnCoolen
Comment options

@aelvan
Comment options

@aelvan
Comment options

@StijnCoolen
Comment options

@aelvan
Comment options

Answer selected by aelvan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants