We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42035
    • 90 Posts
    Hello Everyone
    I am newer in modx while i am working on small project than i get one issue.
    When i upload images than it can't display images. i can see the name of the images which are uploaded. my site is in subfolder in directory.

    So plz help me to solve this problem.
      Arkalp.com
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Do you have a ~ in the url, if so you may need to allow phpthumb above the webroot. Also what if any errors are present in the Error Log?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 37582
        • 65 Posts
        Do you use Evo or Revo? Sometimes you have to adjust the filemanager paths in the system settings. This should be done automatically in Revo.
          • 38290
          • 712 Posts
          Also make sure (if you have one) that your base URL is correct. It's common to use
          <base href="[[++site_url]]" />


          and then
          <img src="/assets/myimg.jpg" />
            jpdevries
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            The point here is to keep a firm grip on the difference between relative and absolute URLs (relative and absolute paths are another matter altogether). With URLs, a leading / means "the root of the webspace" where the web server starts when it looks for its files. Omitting the / means "relative", relative that is to the .php script (or the .html file) being run at the moment. In our case, it's the index.php being run, whether the root-level index.php for front-end or the /manager/index.php for the Manager.

            MODx offers two settings, site_url and base_url. The site_url setting will give the full first part of the URL for the site, such as http://sottwell.sottwell.modxcloud.com/ (note the trailing slash is included). The base_url will usually just be the leading / to indicate that the base of the site is the web root. If the installation is in a subdirectory (and not an actual virtual host, where the web server takes care of the root location issue) it might look like this /revodev/ - it shows the absolute URL starting at the web root, again including the trailing slash. [ed. note: sottwell last edited this post 13 years, 10 months ago.]
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 42035
              • 90 Posts
              Quote from: dinocorn at Nov 22, 2012, 05:47 PM
              Also make sure (if you have one) that your base URL is correct. It's common to use
              <base href="[[++site_url]]">


              and then
              <img src="/assets/myimg.jpg">

              I get my result after use this code. Thanx for reply i solved my problem.
                Arkalp.com