We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are using the Sharp Transform Method and the createOptimizedImages() function in a twig template. (Don't judge)
createOptimizedImages()
What is the best way to configure modes and fit? Am I missing something? Would be cool if we could pass that in with the variant.
Sometimes we want to 'cover' and sometimes we want to 'contain'
{ 'width': width, 'useAspectRatio': ( height != null ) ? true : false, 'aspectRatioX': width, 'aspectRatioY': height, 'retinaSizes': ['1'], 'quality': 90, 'format': 'jpg', 'fit': 'contain' }
Probably also background color. It is black at the moment. When forced to 'contain'.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Question
We are using the Sharp Transform Method and the
createOptimizedImages()
function in a twig template. (Don't judge)What is the best way to configure modes and fit? Am I missing something? Would be cool if we could pass that in with the variant.
Sometimes we want to 'cover' and sometimes we want to 'contain'
Probably also background color. It is black at the moment. When forced to 'contain'.
The text was updated successfully, but these errors were encountered: