We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51354
    • 11 Posts
    We're running Modx revo for a couple years now. We are using pthumb for creating some transparent thumbnails. This was all perfect until suddenly white backgrounds appeared in the images (possibly after a modx update). I've tried everything, but I can't find a solution.


    • Modx 2.6.0
    • PHP Version 7.0.26
    • We're not using resizer (phpthumbof.use_resizer=false)
    • I'm very sure the image has a transparent background.
    • The problem also occurs in the manager. When I hover over the images in the file manager. They where always transparent until now.
    • All cache is cleared; core/cache and assets/image-cache folders where both deleted

    Even when directly calling phpthumb.php, the problem exists.
    /connectors/system/phpthumb.php?w=400&h=600&src=image.png&source=2

    When I add &bg=333 and don't crop the image, grey strips are added to the sides of the image, but the main image still isn't transparent.

    Does someone have an idea where to start looking?
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      I think 2.6 may have introduced a change where a checkered background would be shown for transparent images in the media manager, but I don't immediately have the source for that ready. Should be on github, and might point you in a certain direction.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 51354
        • 11 Posts
        Quote from: markh at Dec 07, 2017, 07:47 PM
        I think 2.6 may have introduced a change where a checkered background would be shown for transparent images in the media manager, but I don't immediately have the source for that ready. Should be on github, and might point you in a certain direction.

        So, you guys have a checkerboard background for transparent images? I've only one Modx installation, so I can't check.
        Before the issue transparent images got the background of the popup/tooltip (dark grey). This way the image can be way off. So I get that this could've been updated.
        It wasn't fixed in 2.5 already? Then I'll start looking into all commits between 2.5 and 2.6... But I've never been in the core of Modx, so it's not gonna be easy.

        Maybe someone else who knows a little bit more of what happened?