# Sources

## HTTP Source

The HTTP source fetches original images via GET request.

### Example

{% code title="config.yml" %}
```yaml
sources:
  - http:
      root: https://example.com/assets/:image
```
{% endcode %}

### Options

| Name |                                                                                                                       |
| ---- | --------------------------------------------------------------------------------------------------------------------- |
| root | <p>The url of original image.</p><p><strong>Type:</strong> string with parameters</p><p><strong>Required</strong></p> |

## S3 Source

The S3 sources fetches original images from a S3 bucket. Can also be used for Digital Ocean spaces, by changing the endpoint.

### Example

{% code title="config.yml" %}
```yaml
sources:
  - s3:
      access_key_id: 'xxxx'
      secret_access_key: 'yyy'
      region: 'nyc3'
      bucket_name: 'my-bucket'
      path: 'originals/:image'
```
{% endcode %}

### Example ([minio](https://min.io/))

{% code title="config.yml" %}
```yaml
sources:
  - s3:
      access_key_id: 'xxxx'
      secret_access_key: 'yyy'
      region: 'us-east-1'
      bucket_name: 'my-bucket'
      path: 'originals/:image'
      endpoint: "http://localhost:9000"
      sslDisabled: true
      signatureVersion: "v4"
      s3ForcePathStyle: true
```
{% endcode %}

### Options

| Name                |                                                                                                                                                                                                                          |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| access\_key\_id     | <p>Access key id from S3</p><p><br><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                     |
| secret\_access\_key | <p>Secret access key from S3</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                     |
| region              | <p>Region of S3 bucket</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                           |
| bucket\_name        | <p>Name of bucket</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                                |
| path                | <p>Path of the original image in the bucket</p><p><strong>Type:</strong> string with parameters</p><p><strong>Required</strong></p>                                                                                      |
| endpoint            | <p>Which endpoint to use, useful if using Digital Ocean Spaces.</p><p><strong>Type:</strong> string</p><p><strong>Default:</strong> derived from bucket_name and region, as per AWS standard.</p>                        |
| sslDisabled         | <p>Disable SSL validation (useful when using a local S3 compatible server, minio)</p><p><strong>Type:</strong> boolean</p><p><strong>Default:</strong> false</p>                                                         |
| signatureVersion    | <p>S3 Signature Version (useful when using a local S3 compatible server, like minio)</p><p><strong>Type:</strong> string</p><p><strong>Default:</strong> defaults to AWS SDK internal default value for this setting</p> |
| s3ForcePathStyle    | <p>S3 force path style (useful when using a local S3 compatible server, like minio)</p><p><strong>Type:</strong> string</p><p><strong>Default:</strong> defaults to AWS SDK internal default value for this setting</p>  |

{% hint style="info" %}
Avoid using forward slash in **path**, it will create unnamed folders.
{% endhint %}

## Volume Source

The volume sources fetches original image from disk.

### Example

{% code title="config.yml" %}
```yaml
sources:
  - volume:
      root: /mnt/images/:image
```
{% endcode %}

### Options

| Name |                                                                                                                                   |
| ---- | --------------------------------------------------------------------------------------------------------------------------------- |
| root | <p>The path of the original image on disk</p><p><strong>Type:</strong> string with parameters</p><p><strong>Required</strong></p> |
