We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6038
    • 228 Posts
    So I designed this great mockup with round cornered images, and then realised it depended on being able to see a background image through the corners, and not just a flat colour. No problem - CSS3 border radius to the rescue!

    But this wasn’t going to work in IE<9 even with any of the myriad javascript/html hacks to get rounded corners working as they all depend on a flat background colour.

    So I discovered setting my image thumbnails with phpthumbof it was really quite easy to get this effect. Pass in the rounded corner filter with horizontal and vertical radii, and also a file format of png and boom! Too good not to share.

    <img src="[[phpthumbof? &input=`assets/images/products/[[+product.image1]]` &options=`w=120&h=77&fltr[]=ric|10|10&f=png`]]" width="120" height="77">


    This produced a png with transparent rounded corners each 10px radius.

      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Great tip!!

      That’s definitely something to keep in mind.

      Thanks for sharing! laugh
        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.