we need to take into account the devicePixelRatio in order to calculate the thumbnail size, otherwise we will losing quality