Do you have a reference to the grid here? Ideally there should be an API to return to you the correct image size - unfortunately we have not figured that out properly yet. I would assume that we want a better way of exposing this: https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/items/grid_item.js#L86

That goes to here: https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/grid_layout.js#L79

It sort of works, but we still have some icon problems - I think it's because we're not properly considering devicePixelRatio yet. We have bug 1014364 open for it and we will solve it in the next week or two. For now I guess your options are either to go with what you have here, or use the current value in the grid.layout object. (Both will provide incorrect results, but if you use grid.layout it should be fixed in the next week or two).