|
1 | 1 | <txp:evaluate test="image_info"> |
2 | 2 | <figure itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> |
3 | | - <txp:yield /> |
| 3 | + <txp:smd_if_thumbnail type="article-832w"> |
| 4 | + <txp:smd_thumbnail type="article-832w"> |
| 5 | + <img loading="lazy" width="<txp:evaluate query='ceiling(<txp:image_info type="w" />div2)' />" height="<txp:evaluate query='ceiling(<txp:image_info type="h" />div2)' />" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:smd_thumbnail_info item="url" />" srcset="<txp:image_url /> 2x"> |
| 6 | + <meta itemprop="width" content="<txp:evaluate query='ceiling(<txp:image_info type="w" />div2)' />"> |
| 7 | + <meta itemprop="height" content="<txp:evaluate query='ceiling(<txp:image_info type="h" />div2)' />"> |
| 8 | + </txp:smd_thumbnail> |
| 9 | + <txp:else /> |
| 10 | + <txp:if_yield name="dark-option"> |
| 11 | + <img loading="lazy" class="prefers-color-scheme" width="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>" height="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:image_url />" data-src-light="<txp:image_url />" data-src-dark="<txp:image_url id="<txp:yield name="dark-option" />" />"> |
| 12 | + <txp:else /> |
| 13 | + <img loading="lazy" width="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>" height="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:image_url />"> |
| 14 | + </txp:if_yield> |
| 15 | + <meta itemprop="width" content="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>"> |
| 16 | + <meta itemprop="height" content="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>"> |
| 17 | + </txp:smd_if_thumbnail> |
4 | 18 | <figcaption itemprop="caption"> |
5 | 19 | <txp:image_info /> |
6 | 20 | </figcaption> |
7 | 21 | </figure> |
8 | 22 | <txp:else /> |
9 | 23 | <p itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> |
10 | | - <txp:yield /> |
| 24 | + <txp:smd_if_thumbnail type="article-832w"> |
| 25 | + <txp:smd_thumbnail type="article-832w"> |
| 26 | + <img loading="lazy" width="<txp:evaluate query='ceiling(<txp:image_info type="w" />div2)' />" height="<txp:evaluate query='ceiling(<txp:image_info type="h" />div2)' />" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:smd_thumbnail_info item="url" />" srcset="<txp:image_url /> 2x"> |
| 27 | + <meta itemprop="width" content="<txp:evaluate query='ceiling(<txp:image_info type="w" />div2)' />"> |
| 28 | + <meta itemprop="height" content="<txp:evaluate query='ceiling(<txp:image_info type="h" />div2)' />"> |
| 29 | + </txp:smd_thumbnail> |
| 30 | + <txp:else /> |
| 31 | + <txp:if_yield name="dark-option"> |
| 32 | + <img loading="lazy" class="prefers-color-scheme" width="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>" height="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:image_url />" data-src-light="<txp:image_url />" data-src-dark="<txp:image_url id="<txp:yield name="dark-option" />" />"> |
| 33 | + <txp:else /> |
| 34 | + <img loading="lazy" width="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>" height="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>" itemprop="url contentUrl" alt="<txp:image_info type="alt" />" src="<txp:image_url />"> |
| 35 | + </txp:if_yield> |
| 36 | + <meta itemprop="width" content="<txp:if_yield name="set-width"><txp:yield name="set-width" /><txp:else /><txp:image_info type="w" /></txp:if_yield>"> |
| 37 | + <meta itemprop="height" content="<txp:if_yield name="set-height"><txp:yield name="set-height" /><txp:else /><txp:image_info type="h" /></txp:if_yield>"> |
| 38 | + </txp:smd_if_thumbnail> |
11 | 39 | </p> |
12 | 40 | </txp:evaluate> |
0 commit comments