11ty / 11ty/image

Questions regarding eleventy-img config

Open
#247 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
467
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I used your elventy.conifg.image.js in my project. I only had to change the object for the relative path, because the images are all in one assets folder. Thank you so much sharing this config. That helped me a lot.

Not sure if this is the right place for asking those questions. However, I’ll try it anyway:

  • I was wondering if there is an explanation that the img tag used the width and height attributes from the original image size, which is 600px? It loads the smaller version, which is 300px.
  • Maybe I understand the concept not good enough, but why does the img not uses the srcset and sizes attributes?
image

And a bonus question ;-) Would it make sense to use an example how to use all parameter possible within the shortcode in this starter? I found only one example without srcset and sizes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the referenced elventy.conifg.image.js configuration and the starter's shortcode example, focusing on the img width, height, srcset, and sizes attributes. Document the behavior described in the questions and add an example covering the available shortcode parameters, if appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.