'Logo not showing in header _Layout.cshtml asp net core

There is a project on Asp Net Core 6. The application has 2 areas. route When I log in with default user images display correctly. but when the address bar changes to localhost:44316/Admin/Category - the image disappears javascript code _Layout.cshtml But when route is localhost:44316/ - images show correctly wwwroot hierarchy: enter image description here



Solution 1:[1]

Replace the ../images in _Layout.cshtml to ~/images

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mitokki