Gallery Cards with under 4 images


#1

Hi. I’d like to know if Twitter Gallery Cards support sets of 2-3 images (instead of exclusively “4”).

From my experimentation, when I specify < 4 images the preview does not appear, and the validator reports I’m missing a required parameter (image #2 and/or #3). My domain is approved (photosoci.al), so in the meantime I’ll be filling with blank images should the user share 2-3.

Thanks for any info!


#2

I have a site with gallery card approved. I don’t have them enabled by default but when generated I use the primary photo for image0. For the remaining three, image0 is used if either is undefined.

However, if an image is undefined, I saw a version where an image was scaled to fit the missing space. You may need to get approved with four images before you can use less.


#3

I know this is an old thread but I would like to bring it back up as I think there is still something wrong with how twitter is handling pages with gallery cards that contain less than 4 images.

We tweeted a link to this page which only contained three images and the gallery card did not appear. At the time we only rendered twitter:image0-2 and didn’t include the twitter:image3.
http://www.whosay.com/articles/613-nina-dobrevs-25th-birthday-celebrations?code=rvh7zVF

As the documentation says that all four tags are required we pushed a change that will always render all four elements, and if there is less than four images the content attribute would be empty. This appears to be what twitter wants based on documentation.

We then published a link to this page which only contains two images, and the second two image elements were emtpy. The card still didn’t display.
http://www.whosay.com/articles/619-bones-season-9-what-to-expect?code=OOC7A7q

I feel we have now tried both options and neither work so I don’t know what twitter is expecting.


#4

Same issue here.

No matter whether some image tags are absent or whether just the content tag is empty, the validator fails and Twitter doesn’t show the gallery card.

According to the docs the card can be used with less than 4 images:

You can specify up to 4 different images (…)

It’s a pity we have to drop 1-2 photos per card just because we need to fall back to the photo card.