Hi there. I made http://pix.pe
which is a little toy that lets you turn a 16x16 bit of pixel art into a URL that you can then tweet. I
A while back I added twitter cards support for the photo card, so that you could preview the pixel art inside twitter. It works by generating png files on my server, on the fly, based directly on the contents of the png’s filename. ( decoding it as base64url )
I validated and was approved and whitelisted, using twitter’s validation tool. I’ve been whitelisted for a while. It’s been great.
My experience so far is that twitter cards are quite fickle, and the validator will report “invalid card type” for any problem having nothing to do with the validity of the card type meta tag. I thought I was clever to figure out in the beginning that twittercards will only accept an image of a certain minimum size. So I now blow up my 16x`16 pictures to 1024x1024 for the benefit of twitter’s image proxy.
But now I’ve hit a brick wall. I thought I had broken twitter cards in a recent update. but I didn’t. Twitter cards will work with some of my pix.pe urls, but not others, and the reason for the breakage seems directly related in some way to the number of Alpha characters in the image url.
so for instance, a blank white pixpe works just fine
http://pix.pe/CAAA________________________________________________________________________________________________________________________________
and a certain amount of alpha characters will work too
http://pix.pe/CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA___________________________________________________________________
right up to this amount. 91 alpha characters after the /
http://pix.pe/CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_________________________________________
but then one more A, and this doesn’t work, 92 alphas: "invalid card type"
http://pix.pe/CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA________________________________________
replace them mostly with 0’s and it works
http://pix.pe/CAAA0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000________________________________________
replace with 9’s, and it works
http://pix.pe/CAAA9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999________________________________________
a pixpe made entire of 9’s works
http://pix.pe/CAAA99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
but this one, with the same amount of 92 Alphas’s, broken up in the middle by underscores, does not work. invalid card type
http://pix.pe/CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_________________________________________AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
I can detect no obvious difference in my server’s response. The html it produces is just a simple substitition: the image url is the same as the html url but with .png on the end. (and the second letter replaced with a “D” for “jumbo twitter size picture, please”). There’s no weird regex mistake on my end, the html you get from every one of these urls is the same, except for the url itself in the meta tags. It’s the twitter card validator. There is some limitation it has on what is allowable as an image url, and I just can’t work out exactly what it is. The only workaround I can think of is providing a special URL format just for twitter cards that contains only number characters. Maybe that will make the twitter card gods happy.