elementor / elementor/elementor

🐞 Image dimensions are not specified in the Image Carousel

Open
#11,348 22 comments 7 reactions 0 assignees View on GitHub
bug component/swiper mod* mod/v* type/performance type/seo widget/image-carousel*
Dominant language
PHP
Stars
7.1k
Forks
1.6k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

## Prerequisites

- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] The issue still exists against the latest stable version of Elementor.

## Description

Test with **GTmetrix** an Elementor site that uses the **Image Carousel Widget**.

One of the recommendations will be to **Specify image dimensions**.

![Performance_Report_GTmetrix](https://user-images.githubusercontent.com/576623/81697043-611f2a80-946d-11ea-915c-36f52ceff338.png)

The image carousel widget _does not_ add `width` and `height` attributes to `` tags. See source here: https://github.com/elementor/elementor/blob/master/includes/widgets/image-carousel.php#L692

> Specifying a width and height for all images allows for faster rendering by eliminating the need for unnecessary reflows and repaints.

Source: https://gtmetrix.com/specify-image-dimensions.html

## Steps to reproduce

1. Create an Elementor page.
2. Add the image carousel widget.
3. Save the page.
4. Test the page URL in https://gtmetrix.com/

## Isolating the problem

- [x] This bug happens with only Elementor plugin active (and Elementor Pro).
- [x] This bug happens with a default WordPress theme active.
- [x] I can reproduce this bug consistently using the steps above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.