initialize slider only if there are images