# dl

Make your images downloadable with a simple URL parameter

## How it works

The `dl` parameter allows you to control whether an image is displayed in the browser or downloaded automatically. When enabled, the browser will prompt the user to download the image instead of displaying it.

## Usage

Add `?dl=1` to any HCTI.io image URL to make it downloadable:

```plaintext
https://hcti.io/v1/image/7cb776c5-8c12-4b1a-84aa-9941b815d873.jpg?dl=1
```

## Example usage

### HTML download link

Create a download button or link:

```html
<a href="https://hcti.io/v1/image/7cb776c5-8c12-4b1a-84aa-9941b815d873.jpg?dl=1"
   class="download-button">
  Download Image
</a>
```

### JavaScript download trigger

Programmatically trigger a download:

```javascript
function downloadImage(imageId) {
  const downloadUrl = `https://hcti.io/v1/image/${imageId}?dl=1`;
  window.location.href = downloadUrl;
}
```

## Common use cases

*   Creating downloadable certificates or badges
*   Offering high-resolution versions of images
*   Generating downloadable reports or charts
*   Providing image assets for users

File Format Tip

The `dl` parameter works with JPG, PNG, and WebP. The downloaded file will maintain the extension specified in the URL.

## Need help?

Talk to a human. Email [support@htmlcsstoimage.com](mailto:support@htmlcsstoimage.com) and we’ll help you get started.
