Skip to content

ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Firefly uploads#750

Open
dstrong23 wants to merge 12 commits into
stagefrom
ado-MWPW-190444-remove-512-dimension
Open

ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Firefly uploads#750
dstrong23 wants to merge 12 commits into
stagefrom
ado-MWPW-190444-remove-512-dimension

Conversation

@dstrong23
Copy link
Copy Markdown
Collaborator

@dstrong23 dstrong23 commented Apr 22, 2026

Resolves: MWPW-190444

Test URLs:

Fixes MWPW-190444 — removes the 512×512 minimum image dimension restriction from Firefly upload flows.

The 512×512 minimum was a product-specified requirement that has since been lifted. The restriction was enforced on the primary upload path but was never applied to the Edit flow (reference image upload from device), causing an inconsistency. Removing the config entries resolves both issues simultaneously: the primary upload no longer blocks small images, and the Edit flow inconsistency is moot.

Root Cause
The 512×512 minimum dimension was hardcoded in target-config.json under limits-firefly as minHeight: 512 and minWidth: 512. This config is merged into this.limits in action-binder.js at construction time and evaluated in checkImageDimensions(). Because isMinLimits is only truthy when both minWidth and minHeight are present, removing these keys from the config causes the minimum-dimension check block to become a no-op with no JS changes required.

The Edit flow (reference image upload via the prompt-bar widget) bypassed uploadImage() entirely and therefore never called checkImageDimensions(), which is why the inconsistency existed. Both paths now behave identically: no minimum dimension is enforced.

Changes
File: unitylibs/core/workflow/workflow-upload/target-config.json

Removed minHeight: 512 from limits-firefly
Removed minWidth: 512 from limits-firefly
All other limits (maxFileSize, allowedFileTypes) are unchanged
Photoshop and Lightroom limits (limits-photoshop, limits-lightroom) are completely unaffected
No JavaScript changes are required.

Verification
Confirmed minHeight/minWidth only exist in target-config.json in this repo (no other JS files hardcode these values)
Confirmed fallback.js reference to minHeight is a CSS property on a browser-compatibility banner — unrelated
Confirmed no API endpoint dynamically supplies dimension limits — this config is the single source of truth
Testing
Verify images smaller than 512×512 can be uploaded via the main upload flow on Firefly/Doodlebug pages
Verify images smaller than 512×512 can be uploaded via the Edit flow (reference image from device)
Verify images above maxFileSize (100MB) are still correctly rejected on both paths
Verify allowed file types (JPEG, PNG, WEBP) validation is still enforced
Verify Photoshop and Lightroom upload validation is unaffected
Jira
MWPW-190444

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 22, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

arugupta1992 and others added 8 commits April 23, 2026 12:42
* Implementing fetch request to page config API post-LCP
* Scalable and backwards-compatible approach to fetch experiment data
and leverage location header for successive API calls

Resolves: [MWPW-191927](https://jira.corp.adobe.com/browse/MWPW-191927)

**Test URLs:**
- Before:
https://main--dc--adobecom.aem.page/acrobat/online/compress-pdf?unitylibs=stage
- After:
https://main--dc--adobecom.aem.page/acrobat/online/compress-pdf?unitylibs=MWPW-191927
Testing Notes: 
1. Regress all the upload workflow acros products
2. Test the limits for each product

Resolves: [MWPW-193670](https://jira.corp.adobe.com/browse/MWPW-193670)

**Test URLs:**
- Before:
https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=stage
- After:
https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=wave2-video

---------

Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
Co-authored-by: Vipul Gupta <vipugpta@gmail.com>
Co-authored-by: vipulg <vipulg@adobe.com>
@dstrong23
Copy link
Copy Markdown
Collaborator Author

@sanjayms01 sanjayms01 changed the title ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Fi… ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Firefly uploads May 1, 2026
@asonnalagi
Copy link
Copy Markdown
Collaborator

Verified main upload flow and Edit flow. All looks fine. All error toasts are working fine.
Able to upload images which are smaller than 512×512.
Device testing has stage dependency. Once this PR will merge to stage will verify in device.
Verified Photoshop and lightroom as well. These are unaffected.
Test results are in the subtask: MWPW-194282

"limits-firefly": {
"allowedFileTypes": ["image/jpeg", "image/png", "image/jpg", "image/webp"],
"maxFileSize": 100000000,
"minHeight": 512,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alone will not help remove this file dimensions check completely.
As per the code, We still proceed for extracting the file dimensions first, and then if we don't find the minWidth/minHeight in target config, only then we skip and proceed further. Just in case we error out while finding the dimensions we fail even if no limits are mentioned in target config.
We should simply remove the check at the first place where we are calling this, cleanup the code, alongside removing the limits from the targetconfig.json.
@dstrong23 @sanjayms01

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vipu0303 That's a good point. I see you have another PR to take up that change. Is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants