checking size of last data-image attribute, so not to load multiple images