From the HTML5 spec :
All attribute names on HTML elements in HTML documents get ASCII-lowercased automatically
Use lowercase names :
var ImgSmall = $('img').data('imgsmall'),
ImgMedium = $('img').data('imgmedium'),
ImgLarge = $('img').data('imglarge'),
img = $('img');