Ngnix not loading dynamic assets in production

#offtopic
Does anyone have any idea about the issue of ngnix not loading assets (image files) in production (nginx)
these files are from the phone-input plugin

// routes from the plugin code
Route::get('/phone-input-flags.png', function () {
    return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/flags.png');
});

Route::get('/phone-input-flags@2x.png', function () {
    return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/flags@2x.png');
});


I have even manually added it to the vhost file

location = /phone-input-flags.png {
        try_files $uri /index.php?$query_string;
}


still, it is being considered as a static PNG file and the call is not going to Laravel route.
On the other end livewire.js is working perfectly though.

Could you please help with this if you have any ideas?
thank you, πŸ™‚
Was this page helpful?