ampproject / ampproject/amphtml

Support fallback attribute in amp-img for amp-carousel 0.2

Open
#27,777 5 comments 1 reaction 0 assignees View on GitHub
Stale Type: Bug
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

When i use amp-carousel-0.2.js and "fallback" attribute in amp-img i have error:
**Found more than one images or none in slide!**

**Source code:**

```






```
![2020-04-15](https://user-images.githubusercontent.com/8680309/79323859-701ac780-7f17-11ea-8ee4-15ce9d27f69f.jpg)

When using amp-carousel-0.1, this error does not appear.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied markup with amp-carousel-0.2.js, then inspect how amp-carousel-0.2.js counts amp-img elements in each slide and compare that behavior with amp-carousel-0.1. Done means the nested fallback amp-img is accepted without the “Found more than one images or none in slide!” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.