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

🐛 not resolve 'srcset' url in html #720

Closed
itslooklike opened this issue Jan 31, 2018 · 3 comments
Closed

🐛 not resolve 'srcset' url in html #720

itslooklike opened this issue Jan 31, 2018 · 3 comments

Comments

@itslooklike
Copy link
Contributor

🎛 Configuration (.babelrc, package.json, cli command)

parcel src/index.html
config "from the box"

🤔 Expected Behavior

url in srcset will be generate, and put pictures in dist folder

😯 Current Behavior

srcset urls stays as in source html

image

💁 Possible Solution

parsing srcset tag?

🔦 Context

i try to make retina ready html

info about srcset
https://htmlreference.io/element/img/

💻 Code Sample

<img src="assets/restaurants/restaurant-mcdonalds.png" srcset="assets/restaurants/[email protected] 2x" />

image

🌍 Your Environment

Software Version(s)
Parcel 1.5.1
Node 8.9.3
npm/Yarn 5.5.1
Operating System macos 10.13.3
@osdevisnot
Copy link
Contributor

@itslooklike it seems @lbguilherme already resolved this in #681. It seems the fix will be available in next parcel release.

@brandon93s
Copy link
Contributor

That's correct, this will be available in the next installer. You can use it now by installing from GitHub.

@mdings
Copy link

mdings commented Mar 3, 2018

This still doesn't work for srcset defined on a source tag.

For example:

<picture>
    <source srcset="img/gallery/400x600.jpg" media="(min-width: 768px)">
    <img src="img/gallery/800x600.jpg">
</picture>

compiles to:

<picture>
    <source srcset="img/gallery/400x600.jpg" media="(min-width: 768px)">
    <img src="/dist/f44ad9eb3800b52d8c644dd71c6f34d6.jpg">
</picture>

Is there a way to reopen the ticket?

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

4 participants