I have set a Drupal 8 project into another server with some child directory. This D8 project is working good, But images are not showing due to path missing. E.g

My project is setup:- http://abc.xyz.com/client/development/project-name/

but when I was inspecting element then I got image URL:-http://abc.xyz.com/sites/default/files/images.png

I know client/develoment/project-name/ path is missing into the image path. May you let me know how to get full image path display?

Full path must show:-http://abc.xyz.com/client/development/project-name/sites/default/files/images.png


  • In what context you want image url? Are you in custom module ? Twig template?
    – GiorgosK
    Apr 10, 2019 at 10:23
  • Want to display image in the browser.Bcoz project already is done but images are not displayed. Apr 10, 2019 at 10:25
  • Do anything change in default/settings.php page? Apr 10, 2019 at 10:27
  • Images are inside the body or part of fields, you have to give more information otherwise the question is very broad.
    – GiorgosK
    Apr 10, 2019 at 10:50
  • Images are inside into the body. Apr 10, 2019 at 10:53

1 Answer 1


Images are hardlinked inside the body field.

One way to correct it is to do a search and replace inside the database.

Perhaps also pathologic can help correct the problem with broken images.

  • add pathologic support to your desired text formats (congig > content authoring > text formats)
  • make sure you check Correct URLs with Pathologic

when visiting a page pathologic should correct those broken images

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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