Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

doc: self-hosting

fenosdcc6c4ede8bd
diff --git a/apps/docs/pages/guides/storage/image-transformations.mdx b/apps/docs/pages/guides/storage/image-transformations.mdx
index 0c558459810..76c1235603d 100644
--- a/apps/docs/pages/guides/storage/image-transformations.mdx
+++ b/apps/docs/pages/guides/storage/image-transformations.mdx
@@ -59,7 +59,7 @@ supabase.storage.from('bucket').download('image.jpg', {
})
```
-## Automatic Image Optimisation Detection (WebP)
+## Automatic Image Optimisation (WebP)
When using the image transformation API we will automatically find the best format supported by the browser and return that to the client, without any code change.
For instance, if you use Chrome when viewing a jpeg image and using transformation options, you'll see that the content-type returned is `webp`.
@@ -67,12 +67,12 @@ For instance, if you use Chrome when viewing a jpeg image and using transformati
In result, this will lower the bandwidth that you send to your users and your application will load much faster.
<Admonition type="note">
- We currently only support WebP, AVIF support will come in the near future
+ We currently only support WebP. AVIF support will come in the near future
</Admonition>
**Disabling automatic optimisation:**
-In case you'd like to return the original format of the image and **opt-out** from the automatic image optimisation detection, you can pass the `format=origin` parameter when requesting a transformed image,
+In case you'd like to return the original format of the image and **opt-out** from the automatic image optimization detection, you can pass the `format=origin` parameter when requesting a transformed image,
this is also supported in the SDK starting from v2.2.0
```ts
@@ -175,6 +175,34 @@ supabase.storage.from('bucket').download('image.jpg', {
| BMP | `bmp` | ☑️ | ☑️ |
| TIFF | `tiff` | ☑️ | ☑️ |
+## Self Hosting
+
+Our solution to image resizing and optimisation can be self-hosted as with any other Supabase product.
+Under the hood we use the awesome [Imgproxy](https://imgproxy.net/)
+
+#### Imgproxy Configuration:
+
+Simply deploy an imgproxy container with the following configuration:
+
+```yaml
+ imgproxy:
+ image: darthsim/imgproxy
+ environment:
+ - IMGPROXY_ENABLE_WEBP_DETECTION=true
+ - IMGPROXY_JPEG_PROGRESSIVE=true
+```
+
+Note: make sure that this service can only be reachable within an internal network and not exposed to the public internet
+
+#### Storage API Configuration:
+
+Once [Imgproxy](https://imgproxy.net/) is deployed we need to configure a couple of environment variables in your self-hosted [storage-api](https://github.com/supabase/storage-api) service as follows:
+
+```shell
+ENABLE_IMAGE_TRANSFORMATION=true
+IMGPROXY_URL=yourinternalimgproxyurl.internal.com
+```
+
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export default Page