1

for anyone experiencing dirty transparent backgrounds when you transform transparent PNG images with Craft like this:

Source Image:

Src Image

Resized, dirty:

Craft Command: craft.assets.id(2).first().getUrl({width: 300})

dirty image, 300px width

If you don't see the dirt, watch screen from the side!

3

The reason is the GD image library. If you switch to imagick, the transparent background will be clean:

Resized, clean:

clean resize

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.