Add an <img> API reference - #8658
aurorascharff wants to merge 2 commits into
Conversation
802e2ce to
8b6536c
Compare
<img> API reference
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 One Page Changed SizeThe following page changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
|
|
||
| #### Caveats {/*caveats*/} | ||
|
|
||
| * Do not pass an empty string to `src`. React warns in development and omits the attribute. To render no image, omit the `<img>` or pass `null` to `src`. |
There was a problem hiding this comment.
worth explaining why? With an empty attribute the browser would make a request to the current page.
Adds an API reference for the built-in browser
<img>component.The new reference:
It also adds
<img>to the React DOM components index and sidebar.The automatic preloading behavior was introduced in react/react#27191 and discussed in react/react#34217.