Skip to content

Add external images processing functionality#935

Open
gazal2708 wants to merge 11 commits intoadobe:mainfrom
gazal2708:main
Open

Add external images processing functionality#935
gazal2708 wants to merge 11 commits intoadobe:mainfrom
gazal2708:main

Conversation

@gazal2708
Copy link
Copy Markdown

@gazal2708 gazal2708 commented Sep 11, 2025

  • Fixes Add external image processing with width/height parameter extraction #936
  • Add processExternalImages step to extract width/height from URL params
  • Set hardcoded width=750 and quality=65 for external images
  • Add width/height attributes to processed images
  • Add comprehensive test coverage for external images processing
  • Include test fixtures for external images markdown and expected HTML

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

- Add processExternalImages step to extract width/height from URL params
- Set hardcoded width=750 and quality=65 for external images
- Add width/height attributes to processed images
- Add comprehensive test coverage for external images processing
- Include test fixtures for external images markdown and expected HTML
- Replace generic external URLs with realistic Adobe delivery service URLs
- Use format: https://delivery-p12345-e67890.adobeaemcloud.com/adobe/assets/urn:aaid:aem:...
- Remove unnecessary 'other=param' from test URLs
- Align test format with existing codebase patterns
- Add external image test cases to images.md and images.html
- Include scenarios: with width/height, with only width, without width/height
- Use Adobe delivery URLs for realistic testing
- Remove separate external-images test files
- Update rendering.test.js to use images test instead of external-images
- All tests passing with 95.23% coverage for process-external-images.js
- Add EXTERNAL_IMAGE_WIDTH and EXTERNAL_IMAGE_QUALITY constants
- Replace hardcoded '750' and '65' values with constants
- Follow same pattern as BREAK_POINTS in create-pictures.js
- Improve code maintainability and consistency
- Remove hardcoded quality, preserve existing quality in URLs
- Always process external images, add attributes only if width/height present
- Add configurable externalImageUrlPrefixes support
- Add edge case tests for height-only and different domain images
@tripodsan
Copy link
Copy Markdown
Contributor

@gazal2708 please sign the Adobe CLA

- Switch from visitParents to visit for better performance
- Use Object.assign for direct node property modification
- Maintain same functionality with cleaner, more efficient code
- All tests passing with 97.77% coverage
@gazal2708 gazal2708 closed this Sep 15, 2025
@gazal2708 gazal2708 reopened this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add external image processing with width/height parameter extraction

8 participants