Page MenuHomeSealhub

Prevent scaling images up
Closed, ResolvedPublic1 Points

Description

There's no need to resize an image to a size that's larger than the original image. In order to prevent that, we should:

  • ignore all resolutions that are higher than the original resolution of the image
  • if there are any resolutions that are higher than the original resolution, replace them with single resolution that corresponds to the original image's resolution

The points above apply also to the resolutions passed in resulting HTML.

We should cache the information about original image size to avoid probing the original image on every HTML request.

Details

Tested by
kuba-orlik
Coded by
luryxyt
Reviewed by
kuba-orlik
Action required from
luryxyt

Revisions and Commits

Restricted Differential Revision

Event Timeline

luryxyt moved this task from To do to Doing on the Kanban board.
jenkins-user updated Action required from, added: luryxyt.
luryxyt added a revision: Restricted Differential Revision.Sep 7 2023, 14:39
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: KamilBaczkowski, prostyfranek, Wirusik, wrzesinski-hubert, FilipI, brtkuu; removed: luryxyt.
jenkins-user moved this task from Review to Doing on the Kanban board.
jenkins-user updated Reviewed by, added: kuba-orlik.
jenkins-user updated Action required from, added: luryxyt; removed: KamilBaczkowski, prostyfranek, Wirusik, wrzesinski-hubert, FilipI, brtkuu.
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: kuba-orlik; removed: luryxyt.
jenkins-user moved this task from Review to Doing on the Kanban board.
jenkins-user updated Action required from, added: luryxyt; removed: kuba-orlik.
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: kuba-orlik; removed: luryxyt.
jenkins-user moved this task from Review to Doing on the Kanban board.
jenkins-user updated Action required from, added: luryxyt; removed: kuba-orlik.
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: kuba-orlik; removed: luryxyt.
jenkins-user moved this task from Review to Ready for testing on the Kanban board.
jenkins-user updated Action required from, added: AmeliaB, Koossa, karolwojtowicz87, brtkuu, prostyfranek, zbartosz, radoptak; removed: kuba-orlik.
jenkins-user moved this task from Ready for testing to Doing on the Kanban board.
jenkins-user updated Tested by, added: kuba-orlik.
jenkins-user updated Action required from, added: luryxyt; removed: AmeliaB, Koossa, karolwojtowicz87, brtkuu, prostyfranek, zbartosz, radoptak.
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: kuba-orlik; removed: luryxyt.
jenkins-user moved this task from Ready for testing to Ready to land on the Kanban board.
jenkins-user updated Action required from, added: luryxyt; removed: kuba-orlik.
luryxyt added a commit: Restricted Diffusion Commit.Oct 28 2023, 15:13
kuba-orlik shifted this object from the Restricted Space space to the S5 Publiczna space.Oct 30 2023, 13:22
kuba-orlik changed the visibility from "All Users" to "Public (No Login Required)".
kuba-orlik edited projects, added Open-source; removed Restricted Project.Oct 30 2023, 13:35