# Supporting Embedded Content in Web Browsers

A critical element for browser architecture and performance.

- **Source:** [Web Browser Engineering](https://browser.engineering)
- **Published:** 2023-03-20
- **Topic:** [Software & Engineering](https://brifing.si/c/engineering)
- **Original article:** <https://browser.engineering/embeds.html>
- **On Brifing:** https://brifing.si/s/f3705675-98c3-4ee4-a15c-4418d07faea7

## The Importance of Embedded Content

Web browsers support various embedded content beyond text, such as images, videos, and other web pages. This support plays a significant role in browser architecture, performance, and security.

## History of Images

Images have been the most popular embedded content on the web since 1993. However, the way browsers handle images has evolved significantly over time.

## Downloading Images

Images are included in web pages via the img tag. Browsers download images from a URL and process them as binary data.

## Binary Data Processing

Browsers use binary data mode when downloading images. This ensures that images are processed correctly, unlike textual data.

## Encoding Images

Downloaded images are converted into an image object in memory using the Skia library. This process ensures fast and efficient image processing.

## Placing Images on the Page

Images are correctly positioned and sized on the page by the browser. This significantly enhances the user experience.

## Drawing Images

The drawImageRect function of the Skia library ensures that images are drawn correctly on the screen. This function plays a critical role in image display.

## Error Handling

When errors occur during image downloading or encoding, browsers display a 'broken image' placeholder. This prevents users from encountering faulty content.

## Security Measures

Browsers implement various security measures to ensure the safe processing of embedded content. This protects user security.

## Performance Optimization

Efficient processing of embedded content enhances browser performance. This allows users to experience faster and smoother browsing.

## Future Developments

Web browsers are continuously evolving to better support embedded content. This will lead to richer and more interactive web experiences in the future.

## Conclusion

Support for embedded content is a fundamental feature of web browsers. This support significantly enhances browser performance, security, and user experience.

## Sources covering this story

- https://browser.engineering/embeds.html — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
