Images/Graphics will not load when launching Azure Web App.

Alexz Mercury 0 Reputation points
2024-01-14T23:40:08.37+00:00

Hello,

I have been trying to figure out why webpages are not loading for me when I launch them via Azure.

For additional info:

  • I use Azure for Students
  • I have very little clue what I am doing, so ELI5 :(
  • I used "az webapp config container set --name [name] --resource-group [rg] --docker-custom-image-name [name] --enable-app-service-storage -t" and my webpage changes to the expected page, but no images will load. I have also tried using a domain directly from godaddy and connecting it to Azure via the walkthroughs, but I still have no images. I tried using a cloud container to put images in the /var/www/html index.html code via azure SSH, but the images still do not load. I tried opening the src images outside of the environment, and they work.

What can I do? I have been attempting to complete this for 10hrs now to no avail.

Relative path works, just not links. I cannot upload anything, however. I do not know how, and I cannot log in to RealFTP because I do not have a user/pass.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,940 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,175 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2024-01-19T09:32:01.46+00:00

    @Alexz Mercury , Following-up on the above, just to highlight additional pointers.

    Adding to Carlos’ suggestions, I understand the images work locally, please review the file path and startup config, depending on your app web framework.

      --Update content in hostingstart.html file. Uploading Images to Azure Storage from AngularJS App

      --React is a SPA you will probably get a 404 trying to browse the site in certain routes. You need to redirect all queries to the index.html.
    Use a startup command passing --spa argument to PM2 as followed: pm2 serve /home/site/wwwroot/build --no-daemon --spa or using a process file.

      ---sites using our php images have started seeing issues downloading static files (jpg,png,zip,pdf etc) > 2MB. Unable to download static content when using php images on Azure App Service - Linux

    Refer /configure-nginx-for-php-8-linux-azure-app-service/ba-p/3069373

    -- Ensure the image and/or tag is the same name and/or variable throughout the pipeline if dealing with a single image build.

    See manifest not found’, tag not found, or image not found. Isolate if the issue is with any specific file types/extension, path, image exists and is correctly spelled, and Tag exists and is correctly spelled.

    Just to highlight, if you haven't done - add a web.config file to the wwwroot folder with config content , which is highlighted/shared in this similar discussion thread.

    Kindly let us know, I'll follow-up with you further.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.