```js
function getPictureType() {
  var targetWidth = getPreferredPictureDetail();

smallInterval = [0, smallSize + smallSize * 0.25] 
mediumInterval [smallInterval[0] + 1, mediumInterval + mediumSize* 0.25]

if(width > smallInterval[1] && width < mediumInterval[1])
  size = 'medium'
else if(width > mediumInterval[1])
  size = 'large' 
```