Avatar image broken despite already having set APP_URL
Please confirm you have done the following before posting your bug report:
- [ ] I have enabled debug mode
- [x ] I have read checked the Common Issues page
Describe the bug The avatar image is broken (not showing) even though I have set the APP_URL correctly and I have already restarted the server. In the 1st screenshot, the round avatar next to Delete Avatar is showing correctly but the avatar on the top right (next to my username) is broken. BTW, my site is installed on port 8080.
The URL in the screenshot is (sorry, this IP is local so you can't access it) http://172.21.132.73:8080/snipe-it/public/account/profile The APP_URL is APP_URL=http://172.21.132.73:8080/snipe-it
If I do right-click on the broken image, the IMG URL is showing up as http://172.21.132.73:8080/snipe-it/uploads/avatars/dinh-ton.jpg However, the actual image is stored in this link (there's an extra public folder in there) http://172.21.132.73:8080/snipe-it/public/uploads/avatars/dinh-ton.jpg (this one displays just fine)
Also, another page with a broken image is the View Asset page with the broken QR code (screenshot #2). The (broken) IMG URL is http://172.21.132.73:8080/snipe-it/hardware/3/qr_code
To Reproduce Steps to reproduce the behavior: As described, the image is broken right from the top bar. For the QR image, go to any View Asset page.
Expected behavior Expect the uploaded avatar and the generated QR image to show up.
Screenshots If applicable, add screenshots to help explain your problem.


Server (please complete the following information):
- Snipe-IT Version v4.2.0 build 3479 (gbf74bb1)
- OS: Windows
- Web Server: IIS 7 (PHP)
- PHP Version: 5.6.25
Desktop (please complete the following information):
- OS: Windows 8
- Browser Chrome
- Version 70.0.3538.102
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Error Messages
- WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
- Include any additional information you can find in
storage/logsand your webserver's logs.
Additional context
- Is this a fresh install or an upgrade? Fresh Install with WAMP stack.
- What OS and web server you're running Snipe-IT on: Windows 2008 R2, IIS 7, PHP
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) manual
- Include what you've done so far in the installation, and if you got any error messages along the way. Nothing, except for editing the .env file.
- Indicate whether or not you've manually edited any data directly in the database. No.
Add any other context about the problem here. My Snipe-It is installed in the same webserver as a couple other web sites (WMAP stack). Local path is D:\wamp64\www\snipe-it
Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
try in your APP_URL=http://172.21.132.73:8080 w/o the /snipe-it
and make sure your port 8080 is listening to port 80 in your firewall device
sinichi19, I did what you said but the avatar is still broken. This time, the IMG URL is http://172.21.132.73:8080/uploads/avatars/dinh-ton.jpg (ie, the snipe-it folder is gone from the URL).
If I can somehow get the public folder to show up in these links, everything would be fine again.
Also, what I don't understand is that on the same page (screenshot #1), one image shows up correctly while the other one doesn't (the other one is missing public)
If I can somehow get the public folder to show up in these links, everything would be fine again.
You should never have the public directory in any of your URLs. You'll need to configure your host in your web server to handle sub-directories. We have instructions here for Linux, but I'm not sure how you'd handle that in Windows.
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.