Copied to clipboard

Flag this post as spam?

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


  • Gibran Shah 69 posts 240 karma points
    Sep 06, 2020 @ 03:22
    Gibran Shah
    0

    Why is my image not showing up?

    Hello,

    Please have a look at this site:

    http://hollandandbarnes.azurewebsites.net/

    If you scroll down, you'll see a section titled "Explore. Discover. Share." Below that, you'll see a grid of thumbnails starting with "Art Galleries", "Baby Sitters", "Calgary Stampede". Notice that the thumbnail for Calgary Stampede is missing. This is what I need help with.

    enter image description here

    We had an image there recently but then I swapped it for a new one and now it won't show at all. I don't know why.

    Here's what I did in Umbraco:

    I went to the content page for Calgary Stampede, went to the tab where the thumbnail exists, and deleted it:

    enter image description here

    Then I uploaded a new one (the one you see in the screen shot above). Changed the name in the textbox above to be the same as the file name, then clicked save. I verified that the link for the image is the same as the one in the DOM of the page (when inspecting the page):

    enter image description here

    But it doesn't show up on the page. And when I try to go to the image directly with the url below, it tells me "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

    http://hollandandbarnes.azurewebsites.net/media/1036/calgary-stampede-855x570.jpg

    Oddly enough, the image shows up on the page just fine when I run the site locally (in Visual Studio 2017). But not on the public site.

    Is there anything else I need to do in Umbraco to get the image to show up? Thanks.

  • Gibran Shah 69 posts 240 karma points
    Sep 07, 2020 @ 02:54
    Gibran Shah
    0

    I solved it. For some reason, it seems images have to be uploaded once per environment. So I first uploaded the image in my local environment, and it worked there, but then I had to upload the image to the live environment (http://hollandandbarnes.azurewebsites.net/). <-- That did the trick.

    I'm confused by this because I thought Umbraco was an independent data source that both my environments pull from. I don't have to update any of the copy (text) twice. Is it not the same for images?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Sep 07, 2020 @ 06:19
    Marc Goodson
    0

    Hi Gibran

    Umbraco by default stores Media on the local disk, which is why you have the disparity between environments. When you upload an image, a record about that image, it's width and height etc is stored in the database, and that allows you to pick it, to appear in content - but the file itself resides on disk. This is why your deployed environment seems to know about the image's existence but can't actually display it.

    What you can do is configure the Media folder to be stored elsewhere using a FileSystemProvider... for example you can store the actual images in Azure Blob Storage, and then the Media will be available in both environments.

    There is a plugin to help do this:

    https://our.umbraco.com/packages/collaboration/umbracofilesystemprovidersazure/

    regards

    Marc

  • Gibran Shah 69 posts 240 karma points
    Sep 07, 2020 @ 20:08
    Gibran Shah
    0

    Hmm... I see. Thanks Marc.

    So when I uploaded the image through the back office at http://hollandandbarnes.azurewebsites.net/, where did it store it?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Sep 07, 2020 @ 20:30
    Marc Goodson
    0

    Hi Gibran

    It will depend on the configuration in /config/filesystemproviders.config

    but the default would be to the /media folder inside your azure web app

    If you login to your web app's SCM:

    http://hollandandbarnes.scm.azurewebsites.net/

    you can access the file system via 'Debug Console - CMD' and open up the site folder to find wwwroot folder, and that would contain the media folder if that is where things are configured to be stored!

    regards

    Marc

  • Shubham Sharma 7 posts 86 karma points
    Dec 27, 2023 @ 12:17
    Shubham Sharma
    0

    Hi Gibran, Is there any other way to resolve this issue?

Please Sign in or register to post replies

Write your reply to:

Draft