gallery: Use new API like naturalWidth