-
-
Notifications
You must be signed in to change notification settings - Fork 669
Avoid invalid image request in Firefox caused by the template. #3061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Avoid invalid image request in Firefox caused by the template. #3061
Conversation
|
I’ll try to reproduce the issue in the next couple of days. Please allow me 1–2 days and I’ll get back to you with the results. |
|
It kept bothering me, so I jumped back into it, and I ran into something very interesting. It only makes that invalid request when I add an input parameter to the query method. What you can see in the video:
I tested it, and it doesn’t depend on the model—no matter which model I used, I observed the same behavior. I’m attaching the video and the files as well. platform.php: Route::screen('/test/{dataFeed}', \App\Orchid\Screens\TestScreen::class)->name('state'); Uploading Screen Recording 2025-11-20 at 13.22.56.mov… PS: I didn’t try to find out where the problem comes from; unfortunately, I don’t have time for that right now. |
|
I was able to reproduce this both in the latest version and in the It looks like the issue is related to how Firefox handles the Fortunately, for images, this is easy to fix: you just need to add the <img class="attach-image rounded border user-select-none overflow-hidden"
src="{url}"
loading="lazy"
title="{original_name}"/>You can update your PR? Ideally, please target the |

Firefox is the only browser that processes the contents of tags and attempts to load the image referenced with src="{url}". This results in a 404 response, and because my server is configured with Fail2Ban to block repeated 404 requests, Firefox ends up banning me from my own server.
This issue occurs only in Firefox—Chrome and other browsers ignore the contents of elements as expected.
Solution:
I initialized the template’s image with a 1-pixel transparent placeholder and then set the real URL via a query selector instead of performing a string replace on innerHTML. I also added an alt attribute to the image.