Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hong 66 posts 228 karma points
    Dec 23, 2017 @ 02:01
    Hong
    0

    No images are displayed

    I have just installed Umbraco by taking the NuGet approach. It has gone well generally. If I run the project locally, everything appears to work fine. However, the published version does not show any images. Here is the local version: enter image description here

    Here is the published version: enter image description here

    I have confirmed that the image file \Media\103016403439029f500be349bo.jpg has been published to the right place. I can see the image by using URL: host-address/media/1030/16403439029f500be349bo.jpg

    Could anyone offer a tip on this?

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 23, 2017 @ 14:15
    Craig100
    0

    That's a bit odd. The file address should be the same as the url address after /media/ So that might explain it. How did you "publish" the site?

  • Hong 66 posts 228 karma points
    Dec 23, 2017 @ 14:45
    Hong
    0

    I publish it with VS2017 using the Folder option. I have found the problem after I added an image (newimg.png) from BackOffice, and it works. Its path is the following:

    /pagename/media/1031/newimg.png

    Please note "pagename" in the path. When I publish to the website fooweb.org, it is done as a web application of the website. The application name is "pagename".

    I think Umbraco should use "fooweb.org/pagename" as the root. I had trouble with a Package. If I install the package locally without the path issue, it works fine, but it has troubles if install it on the published site with the path.

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 23, 2017 @ 14:52
    Craig100
    0

    Any image that is uploaded into the Media area and then selected to be in a page on the site via a media picker or image cropper should have a url of the form: http(s)://yourdomain.com/media/1234/yourimage.png. The page name should not be in the url for the image.

    When you look in the file system you should see the image in the /media/1234/ folder.

    I suspect the issue could be your publishing method. If I'm not publishing to Azure then I always use FTP, then at least I'm in control ;)

  • Hong 66 posts 228 karma points
    Dec 23, 2017 @ 15:07
    Hong
    0

    Thank you for trying to help out. I am fairly new to Umbraco though I started exploring migrating to Umbraco about a year ago, but the real migration has just started.

    I am wondering if I have confused you. Let me try to clarify it a bit. When I debug the site via VS 2017 locally, its home page is: http://localhost:49663/

    The home page for this Umbraco instance on the published site is: http://xxxxx.xxxxx.org/pagename

    All the media file URIs look like "/pagename/media/..." if they still work. I get this URI by examining the page source.

    I believe VS uses file copying to publish the web site to the server on the same network as the dev machine.

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 23, 2017 @ 15:52
    Craig100
    0

    In that case I'd try to upload and assign a new image in the published site to see if it's ok then. As a diagnostic step.

  • Hong 66 posts 228 karma points
    Dec 23, 2017 @ 15:57
    Hong
    0

    If I understand you correcty, that is exactly what I described in my second post:

    I have found the problem after I added an image (newimg.png) from BackOffice, and it works. Its path is the following:...

    In other words, all the media files of the starterkit do not work for this case. Newly added media files work fine.

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 23, 2017 @ 16:04
    Craig100
    0

    Then we're either back to the publishing method OR you could look at the Home page node's Culture and Hostnames section (right click "...") to see if that can help you.

  • Hong 66 posts 228 karma points
    Dec 23, 2017 @ 16:45
    Hong
    0

    Since I can add images without any problems now, and the starterkit's images are useful only for testing (they will be either deleted or replaced eventually), I should be all set now.

Please Sign in or register to post replies

Write your reply to:

Draft