You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[QTI] A sized image with a srcset should publish its srcset at the authored size #6278
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Once #6189 lands, publish resizes each <img> with a pixel width/height and points its src at the resized copy. It leaves srcset alone, so its candidates still point at the full-size original, and a browser that picks from srcset ignores the resized src. The QTI editor doesn't write srcset, but the QTI img model accepts it, so items imported through the internal API can carry it.
Complexity: Low Target branch:unstable
Context
rewrite_qti_sized_image_paths in contentcuration/contentcuration/utils/assessment/qti/media.py rewrites src only. This item:
A sized <img> with a srcset should display at its authored size in the QTI package, whichever candidate the browser picks. Whether each candidate is resized to its density or the srcset is replaced is the implementer's call.
Acceptance Criteria
A sized <img> whose srcset references Studio media publishes with no candidate pointing at the full-size original.
An <img> with a srcset but no pixel size publishes unchanged.
Publish tests cover each case.
AI usage
rtibbles asked for this follow-up in a review of #6219. Claude Code reproduced the output above against the #6219 branch and drafted this issue.
Activity