Context
A DevForge MCP audit (PRP 003, release v2.5.1) confirmed that the image_srcset handler reads a user-supplied input field that is silently dropped because the corresponding SrcsetJob protocol struct does not have a matching field.
What's missing in dpf
SrcsetJob accepts pixel widths (already wired) but has no field for the HTML sizes attribute — the responsive media-query value used by the browser to pick the right source from the srcset (e.g. (max-width: 600px) 100vw, 50vw).
Suggested field:
sizes: []string — HTML media-query rules, joined with , when rendered into the sizes='' attribute
What DevForge will do once this lands
In internal/tools/image_tools.go (ImageSrcset handler), the handler reads input.Sizes (the HTML attribute, distinct from the pixel-width slice). After this lands, that slice will be passed through to dpf and emitted alongside the generated srcset markup.
Impact
Today, callers asking dpf to produce a <img> snippet with custom sizes rules get a default empty sizes='' attribute. This is a real responsiveness regression for any consumer that wants explicit breakpoint hints.
References
- DevForge commits:
3d1884b, 5235038
- DevForge release: v2.5.1
- DevForge memory:
prp/003-tools-efficiency-and-reuse/preexisting-bugs
Context
A DevForge MCP audit (PRP 003, release v2.5.1) confirmed that the
image_srcsethandler reads a user-supplied input field that is silently dropped because the correspondingSrcsetJobprotocol struct does not have a matching field.What's missing in dpf
SrcsetJobaccepts pixel widths (already wired) but has no field for the HTMLsizesattribute — the responsive media-query value used by the browser to pick the right source from the srcset (e.g.(max-width: 600px) 100vw, 50vw).Suggested field:
sizes: []string— HTML media-query rules, joined with,when rendered into thesizes=''attributeWhat DevForge will do once this lands
In
internal/tools/image_tools.go(ImageSrcsethandler), the handler readsinput.Sizes(the HTML attribute, distinct from the pixel-width slice). After this lands, that slice will be passed through to dpf and emitted alongside the generatedsrcsetmarkup.Impact
Today, callers asking dpf to produce a
<img>snippet with customsizesrules get a default emptysizes=''attribute. This is a real responsiveness regression for any consumer that wants explicit breakpoint hints.References
3d1884b,5235038prp/003-tools-efficiency-and-reuse/preexisting-bugs