<p>The <a href="https://docs.craftcms.com/api/v3/craft-services-volumes.html" rel="nofollow noreferrer">Volumes service</a> is available via <code>craft.app.volumes</code>, so you can do</p>
<pre><code>{% set volume = craft.app.volumes.getVolumeByHandle('volumeHandle') %}
{{ volume.name }}
</code></pre>
<p>or</p>
<pre><code>{% set volume = craft.app.volumes.getVolumeById(123) %}
{{ volume.name }}
</code></pre>
<p>Additionally, if you have an Asset model available, you can get its volume like this:</p>
<pre><code>{% set volume = asset.volume %}
{{ volume.name }}
</code></pre>

CC BY-SA 4.0
2020-11-27T20:47:51.477Z
2020-11-27T20:47:51.477Z
Mats Mikkel Rummelhoff
<p>Figured it out:</p>
<pre><code>{% set query = craft.assets.volume('volumeHandle').one() %}
{{ query.volume.name }}
</code></pre>

CC BY-SA 4.0
2020-11-27T17:28:00.743Z
2020-11-28T00:06:38.577Z
2020-11-28T00:06:38.577Z
Roi Agneta
<p>Trying to figure out how to get the &quot;name&quot; and &quot;handle&quot; of an asset volume, given the volume ID. Tried all the obvious things, no luck!</p>

<assets>
How to Get Asset Volume Name
# How to Get Asset Volume Name

(Asked by: username_0 on 2020-11-27)

Trying to figure out how to get the "name" and "handle" of an asset volume, given the volume ID. Tried all the obvious things, no luck!

**Tags:** assets


---

## 2 answers

### Answer by username_1 on 2020-11-27. Score: 2

The Volumes service is available via craft.app.volumes, so you can do
{% set volume = craft.app.volumes.getVolumeByHandle('volumeHandle') %}
{{ volume.name }}

or
{% set volume = craft.app.volumes.getVolumeById(123) %}
{{ volume.name }}

Additionally, if you have an Asset model available, you can get its volume like this:
{% set volume = asset.volume %}
{{ volume.name }}


---

### Answer by username_0 on 2020-11-27. Score: 1

Figured it out:
{% set query = craft.assets.volume('volumeHandle').one() %}
{{ query.volume.name }}


---

