Hosting an image proxy server for Pixiv¶
If you prefer not to rely on third-party image proxy servers, you can set up your own! By hosting your own proxy server, you can access images from Pixiv by simply changing the Referer to https://www.pixiv.net/
.
By hosting your own Pixiv image proxy server, you can have more control over the caching and access to Pixiv images without relying on external services.
nginx¶
To set up an image proxy server using nginx, follow these steps:
1. Configure the proxy cache path¶
Set the cache path and parameters using the proxy_cache_path
directive under the http
context:
Nginx Configuration File | |
---|---|
2. Set up the server block¶
- Replace
pximg.example.com
with your desired domain.
Cloudflare Workers¶
Alternatively, you can set up an image proxy server using Cloudflare Workers:
Using the proxy server¶
Once you have set up your image proxy server, you can access Pixiv images by replacing the original domain with your proxy server domain:
Additional resources¶
-
For more information, you can refer to this article by pixiv.cat, which also serves as an image proxy server. You can try an example image through their proxy.
-
You can also check out this repository from TechnicalSuwako for additional references and examples.