Skip to content
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

Path of images #5

Open
sjoller opened this issue Oct 3, 2018 · 0 comments
Open

Path of images #5

sjoller opened this issue Oct 3, 2018 · 0 comments

Comments

@sjoller
Copy link

sjoller commented Oct 3, 2018

This will try to fetch the images from the relative path you are on. If I've browsed to "mysite.com/user/profile", this will try to get the flag images from "mysite.com/user/profile/css/flags". This will not work on most frameworks, as they usually pass all requests through one script, that routes the request to the proper controller, thus all URLs are virtual, not actually reachable paths. Sure - rewriting all resource requests to the proper path is possible, but should not be necessary, as it's easily avoided.

A better solution would be, to have all the flags defined as classes, in a CSS file - this would resolve the relative path issue, as all included resources (background-image) in that CSS file, would be relative to the CSS file, not the URL.

An even better solution would be use a sprite for the flags. Requesting 353 small png files, one at a time, is not a good choice.

vladimirbiro added a commit to vladimirbiro/country-picker that referenced this issue Feb 24, 2020
Fix is only in bootstrap-select-country.js
It must also be loaded into *.min.js file, but i do not know how :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant