mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 11:43:26 +08:00
867 B
867 B
| description | paths | |
|---|---|---|
| Image handling rules - Unsplash default, CSP compliance, accessibility |
|
Images
Guidelines:
- Default to Unsplash when the user does not specify an image source; it is pre-configured in CSP and works in Salesforce without extra setup.
- Use URL format:
https://images.unsplash.com/photo-{PHOTO_ID}?w={WIDTH}&h={HEIGHT}&fit=crop&q=80&auto=format(e.g. photo ID1557683316-973673baf926). - If the user requests a different source, use it and inform: "Add CSP Trusted Site in Setup → Security → CSP Trusted Sites".
- Always add descriptive
alttext; usealt=""only for decorative images. - Avoid
placeholder.com,picsum.photos,via.placeholder.comunless requested. - CSP-approved domains:
images.unsplash.com(primary),source.unsplash.com,images.pexels.com.