Transparency not detected when image url doesn't contain an extension
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 331
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 9
Description
Hello!
I'm using nuxt in full static mode with directus as a content source.
Directus has a media library which provides a path to display the files. The path is built as follows:
http://[directus-url]/assets/[FILE_ID]
ex: http://localhost:8055/assets/db6b1d10-3ab0-4c20-a088-0f0246ae3145
When using nuxt-picture with that url as src, it renders a transparent webp as expected but the fallback generated is a .jpeg with a black background.
I tested with a local path to the file /assets/image.png and a distant path containing the .png extension and all is working fine.
Is it an expected behaviour?
Thanks!
nuxt v2.15.7
nuxt-img v0.5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the fallback generation with a Directus-style image URL that has no extension, then compare it with local and extension-bearing URLs. Done means the fallback for a transparent image without an extension no longer receives a black background.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100