Skip to content

[MWPW-193816] skip file dimension check if not able to get width/height of image#780

Merged
vipu0303 merged 3 commits into
stagefrom
mwpw-193816
May 20, 2026
Merged

[MWPW-193816] skip file dimension check if not able to get width/height of image#780
vipu0303 merged 3 commits into
stagefrom
mwpw-193816

Conversation

@vipu0303
Copy link
Copy Markdown
Collaborator

@vipu0303 vipu0303 commented May 19, 2026

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented May 19, 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

try {
({ width, height } = await getImageDimensions(file));
} catch (e) {
window.lana?.log(`Message: Skipping image dimension check (unreadable), Error: ${e}`, this.lanaOptions);
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.

Please remove lana log for client side errors.

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.

Is this logic tested? getImageDimensions() throws an error if the filetupe cannot be determined. I believe if dimensions are not present it may not throw error. Can you check this.?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@arugupta1992 @sanjayms01
even if the fileType is determined and if we are not able to extract the dimensions, it throws an exception which we are not catching and leading to block the user to redirect to FF without giving any proper error message.
We should anyways redirect the user to FF if we are not able to get the dimensions.

wrt to the lana logs, we are not sending any analytics in this case, so I believe we can have the lana log.

@asonnalagi
Copy link
Copy Markdown
Collaborator

Validation done in the branch. All looks fine. Test results are in the task: MWPW-195836

@vipu0303 vipu0303 merged commit d95a8b6 into stage May 20, 2026
7 of 8 checks passed
arugupta1992 pushed a commit that referenced this pull request May 20, 2026
…ht of image (#780)

skip file dimension check if not able to get width/height of image
please check the slack thread for asset details:
https://adobe-mwp.slack.com/archives/C0AE5AP6Q9L/p1778625759895929
Resolves: [MWPW-193816](https://jira.corp.adobe.com/browse/MWPW-193816)

**Test URLs:**
- Before:
https://main--da-cc--adobecom.aem.page/products/firefly/features/ai-image-expander
- After:
https://main--da-cc--adobecom.aem.page/products/firefly/features/ai-image-expander?unitylibs=mwpw-193816

---------

Co-authored-by: vipulg <vipulg@adobe.com>
(cherry picked from commit d95a8b6)
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.

5 participants