Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-27T20:47:51.477Z
Answers.LastActivityDate: 2020-11-27T20:47:51.477Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.Body: <p>Figured it out:</p>
  <pre><code>{% set query = craft.assets.volume('volumeHandle').one() %}
  {{ query.volume.name }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-27T17:28:00.743Z
Answers.LastActivityDate: 2020-11-28T00:06:38.577Z
Answers.LastEditDate: 2020-11-28T00:06:38.577Z
Answers.UserDisplayName: Roi Agneta
Body: <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>
  
Tags: <assets>
Title: How to Get Asset Volume Name
ThreadText: # 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](https://docs.craftcms.com/api/v3/craft-services-volumes.html) 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 }}
  
  ```
  
  
  ---
  
  