Skip to content

Feature request: add config option to control background color in progressiveLoader #211

Open
@dschreij

Description

@dschreij

When using sharp as the service for creating placeholder images, the backgrounds of transparent PNGs are set to black. This looks really weird if a website has a white background (like a retreating oil spill or something). Sharp offers a way to set the background color of the converted image, but this setting is not accessible from the settings offered by vuetify-loader. You can for instance configure the converted image to have a white background with:

sharpImg.flatten({ background: { r: 255, g: 255, b: 255 } })

Similar to what can be done with the configurable size parameter, is it possible to add for instance a bgcolor or background parameter that can be added as

sharpImg.flatten({ background: config.background})

or even

sharpImg.flatten(config.background)

for more granular control?

And a small related question: Can the degree of blur that is applied to the background be controlled as well?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions