devicon
devicon copied to clipboard
[BUG]: Plain icons return 403
I have searched through the issues and didn't find my problem.
- [X] Confirm
Bug description
I'm using the https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/devicon/devicon-plain.svg like urls But some return 403
Some are :
- react
- spring
- tailwind
- mysql
- vault
- nginx
Possible fixes or solutions
Create plain icons for these icons
Additional information
No response
Same issue There are probably many sites relying on this repo for images, and that commit just broke all of them with no warning please add back the -plain icons
Hi there, thank you for reporting this! This was not intended, and not expected, especially for icons like react, where the icon itself hasn't been removed or changed. It seems like something might have gone wrong with some aliases in the latest release.
@lunatic-fox do you have time to take a look at this ASAP?
I'm using the https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/devicon/devicon-plain.svg like urls
I'm kind of confused now. 🤔
The file react-plain.svg
itself does not exist, and if you try to access it directly, it won't work.
If you try to access that file even in the previous version (which had the icons working fine I believe), it won't work: https://cdn.jsdelivr.net/gh/devicons/[email protected]/icons/react/react-plain.svg
I don't think that these icons have ever existed in plain version. For those that I am talking about, it is not a breaking change. I started to use them yesterday.
Perhaps I should not have report that as a bug But as a request icon
The 403 error code misleaded me
Perhaps I should not have report that as a bug But as a request icon
AFAIK, the icons you mentioned have aliases on other versions such as plain
. See, for example, the react
icon.
https://github.com/devicons/devicon/blob/6910f0503efdd315c8f9b858234310c06e04d9c0/devicon.json#L8624-L8633
https://github.com/devicons/devicon/commit/1a35e2be4482f169252543f3259db996e2f0b298 this commit deletes the -plain version for Rust, the -plain icons did exist before
As @jeremygau said it's not a breaking change (with some exceptions), however it's a feature that can be implemented to the project. I mean, since we have aliases to an icon it could fallback to the base icon or to a default icon.
One way that comes to my mind to solve this issue, like the case that @BalaM314 presented, is serving icons by an API. In other words, I could make another API like deviconapi that inherits the functionalities of the current one (which I prefer) or make big changes directly into deviconapi (which can possibly include some breaking changes).
The safest way to use the icons by now is using the devicon.dev site references.
That's weird but I think aliases weren't properly used at all in the project, just like tags.