# Bad value “” for attribute “is” on element “img”: Must be non-empty.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-for-attribute-is-on-element-img-must-be-non-empty
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `is` attribute on the `<img>` element is present but set to an empty string. This attribute names a customized built-in element, so it must hold a valid custom element name and cannot be empty.

A customized built-in element is a standard element with your own behavior added on top. You register one in JavaScript with `customElements.define("lazy-image", LazyImage, { extends: "img" })`, then write `<img is="lazy-image">` to apply it. Custom element names always contain a hyphen. An empty `is=""` names nothing, so the validator rejects it.

This usually comes from a CMS or template that prints `is=""` when the variable behind it is blank. If the image is an ordinary `<img>`, remove the attribute. If it is meant to use a customized built-in element, set the name you registered.

Safari doesn't support customized built-in elements and ignores `is`, so many projects use an autonomous custom element (a hyphenated tag such as `<lazy-image>`) instead.

## Invalid example

```html
<img is="" src="/images/team.jpg" alt="Our support team at the front desk">
```

## Valid example

Remove `is` when the image is an ordinary `<img>`:

```html
<img src="/images/team.jpg" alt="Our support team at the front desk">
```

Or give it the name of a registered customized built-in element:

```html
<img is="lazy-image" src="/images/team.jpg" alt="Our support team at the front desk">
```
