Link Search Menu Expand Document

Upload images to DigitalOcean Spaces

Send every rendered image or PDF to a DigitalOcean Space you control.


HTML/CSS to Image connects to DigitalOcean Spaces through its S3-compatible API. HCTI derives the service endpoint from the Space’s region and authenticates with a Spaces access key and secret.

Plan availability

Storage destinations are available on the 10,000 images/month plan or higher. If you’d like to try this on a different plan, email support@htmlcsstoimage.com.

Before you begin

You need:

  • An existing DigitalOcean Space.
  • The Space’s region, such as nyc3, sfo3, or ams3.
  • An optional key prefix, such as hcti-renders.

The region appears at the beginning of the Spaces endpoint: https://<region>.digitaloceanspaces.com.

Create a Spaces access key

In the DigitalOcean control panel, open the Spaces Keys section and generate a new key.

  1. Give the key a recognizable name.
  2. Restrict it to the destination Space when possible.
  3. Grant object read, write, and delete access for the complete HCTI workflow.
  4. Copy the access key and secret. Save the secret when it is shown.

Write access is required for images and connection tests. Read access lets HCTI reload the original for a later resize, crop, or format conversion when Disable HCTI Storage is selected. Delete access only cleans up connection-test objects; HCTI does not delete your rendered images.

If you configure both a scoped key and an HCTI key prefix, make sure the key’s permitted object path includes that same prefix.

Add DigitalOcean Spaces to HCTI

Open the Storage Destinations dashboard, click Add storage destination, and enter:

HCTI field DigitalOcean value
Provider DigitalOcean Spaces
Bucket Existing Space name
Key prefix Optional folder-like prefix, without leading or trailing slashes
Region Space region, such as nyc3
Access key ID Spaces access key
Secret access key Spaces secret key

Click Test connection, then enable and save the destination after the test succeeds. Copy the destination id for your API requests.

The test writes a small object under <key-prefix>/.hcti/connection-tests/. Cleanup is best-effort, so missing delete access does not make a successful write test fail.

Upload an HCTI image to Spaces

Pass the destination ID as storage_destination_id when you create an image:

curl -X POST https://hcti.io/v1/image \
  -u 'user-id:api-key' \
  -H 'Content-Type: application/json' \
  -d '{
        "url": "https://example.com",
        "storage_destination_id": "your-storage-destination-id"
      }'

Rendering is lazy. With normal HCTI storage enabled, request the returned image URL to render the image and upload the Spaces copy. With Disable HCTI Storage selected, send an authenticated PUT request to the returned /v1/store/... URL.

The base object is stored as <key-prefix>/<image-id>.png, or .pdf when the request uses pdf_options. HCTI does not change the Space’s file permissions or CDN configuration.

Troubleshooting DigitalOcean Spaces uploads

  • The connection test cannot find the Space — Confirm the Space name and the region at the beginning of its endpoint.
  • Authentication fails — Use a Spaces key pair, not a DigitalOcean personal access token.
  • A scoped key returns Access Denied — Confirm that it grants write access to the Space and to the configured prefix.
  • A later transformation fails with HCTI Storage disabled — Add object read access.
  • Connection-test objects remain — Add object delete access for .hcti/connection-tests/.

DigitalOcean documents the Spaces S3-compatible API, endpoints, and permission levels.

Next: use your storage destination

Continue to the Storage Destinations guide for templates, batches, object storage behavior, and the complete PUT /v1/store response.


Need help?

Talk to a human. Please email us support@htmlcsstoimage.com with any questions and we’ll gladly help you get started.


Back to top

Built with extensive integration tests and serious care for developer happiness.
© 2018-2026 Code Happy, LLC.

Page last modified: Aug 27 2026 at 04:31 PM.

Edit this page on GitHub.