Skip to content

Commit

Permalink
HDX-9946 - Limit or auto optimize images that go on the carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
aalecs committed Jul 17, 2024
1 parent 80689de commit 48d6114
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
width = await this._getImageWidth(value);
const urlParams = new URLSearchParams(window.location.search);
const overrideImageContraints = urlParams.get('overrideImage');
if ((overrideImageContraints != "true") && (value.size > 50000 || (width != 550 && width != 275))) {
alert("Please keep files under 50KB and width at either 275px or 550px!");
if ((overrideImageContraints != "true") && (value.size > 50000 || width != 550)) {
alert("Please keep files under 50KB and width at 550px!");
value = null;
} else {
this.model.set('graphic_upload_preview', URL.createObjectURL(value));
Expand Down

0 comments on commit 48d6114

Please sign in to comment.