-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fetch image original either from data-original, or content or contentUrl attr #252
base: master
Are you sure you want to change the base?
Conversation
👍 |
That is a good idea +:100: |
i agree, 👍 |
Rebuilt the min assets to solve conflict. |
Thanks. As mentioned in CONTRIBUTING should not include minified version in pull request. These are handled by the building process. No need to remove though. I can cherrypick around it if I decide to include this. I like the idea of supporting microformats. For me the problem is the attribute names are hardcoded. Next year there will be a new microformat which uses different attribute name. More hardcoded logic needed. It would be better if the attribute name was configurable. This way user can use any arbitrary attribute name he or she chooses. Since there already is
|
Good point, I'll refactor once I get the opportunity and came for your appreciation. By that point I'll also remove the minified commit. Thanks for taking a look into this. |
I've updated the PR, there for your consideration. Thanks! |
Ping? |
@tuupola can this be merged in? |
As microformats keep gaining traction, having attributes that describe better the page, and its information, becomes more and more relevant.
Many "objects" (movie, product, person, etc) can have a photo, which can be tag as itemprop="image". Normally if the element is an IMG the parser would refer to the SRC to know the content of that property. Since with lazy loading we lack that, other attributes can be used: content or contentUrl.
To avoid duplication of one could assume that a missing data-original implies the usage of content, or contentUrl to fetch the original image.
Thoughts?