We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12294
    • 30 Posts
    Hi,

    I’m trying to get an image to display within a module. I’m doing it the same way I would in a snippet:

    $display .='<td><img src =' .$array2['2image'].'></td>';
    


    The only thing it displays is a little image icon with a broken image inside.

    I’ve even just tried:
    '<img src =assets/images/picture1.jpg>'
    


    But with no luck!

    I’m assuming it is possible to display an image, and that I’m being a bit dense as to how!

    Hopefully someone can help!

    Thanks

    Hollie
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Make sure the path to the image is right. In a module, you’re working in the /manager/ directory, so you should probably do ../assets?
        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.
        • 12294
        • 30 Posts
        Thank you! Thank you! Thank you!

        That is exactly what I was missing, those two silly little .. so thank you again!

        It was driving me crazy!

        grin smiley grin

        Hollie