> ## Documentation Index
> Fetch the complete documentation index at: https://perfgrid.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Photon Optimizer

> Activate Photon Optimizer in hosting-panel.net and point your CMS or cache plugin at your Photon hostname to serve WebP and AVIF images.

Photon Optimizer converts **JPEG**, **PNG**, and **GIF** images to **WebP** or **AVIF** as they are requested. You get a Photon hostname on `photoncache.com`. Point your CMS or cache plugin at that hostname so visitors receive the converted images.

Originals stay on your account. Photon caches converted images for 365 days. There is no separate conversion quota or traffic meter.

Photon can also serve CSS, JavaScript, fonts, and video if you route those URLs through the same hostname. It does not optimize those files.

## Activate Photon Optimizer

Open Photon Optimizer in either of these ways. Both go to the same page at [hosting-panel.net/tools/photon-optimizer](https://hosting-panel.net/tools/photon-optimizer).

* **Tools** → **Photon Optimizer**
* **Domains** → the dropdown for a domain → **Photon Optimizer**

<Steps>
  <Step title="Log in">
    Log in to your hosting panel at [hosting-panel.net](https://hosting-panel.net).
  </Step>

  <Step title="Open Photon Optimizer">
    Go to **Tools** → **Photon Optimizer**, or choose **Photon Optimizer** from the domain dropdown on **Domains**.

    If you have not added a service yet, the overview is empty.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/qhkVS58pexMvrO2mz9gIsINr1.png" alt="Photon Optimizer overview with no domains added and a Create Photon Optimizer Service button" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>

  <Step title="Create a service">
    Click **Create Photon Optimizer Service**.
  </Step>

  <Step title="Select the domain">
    Choose the domain to add. The form shows your **Photon Domain** (the hostname on `photoncache.com`) and a **Photon Secret**.

    Copy the **Photon Domain**. You need it for CDN mapping or media URLs. Treat the **Photon Secret** like a password.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/6pEFGZJC2hHybGcR8xN9R9BMS.png" alt="Add Photon Optimizer form with domain, Photon Domain, Photon Secret, and Enable www domain" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>

  <Step title="Enable www if you use it">
    If the site is served on `www`, check **Enable www domain**. Photon then fetches from the `www` hostname. This can take up to 5 minutes to apply when you change it later.
  </Step>

  <Step title="Add Photon Optimizer">
    Click **Add Photon Optimizer**. The domain appears on the overview with its **CDN URL**. That value is the same as **Photon Domain**.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/2DMk1W8wDX87JKzv7CeR7BMrJ.png" alt="Photon Optimizer overview showing one domain, its CDN URL, and empty stats" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>
</Steps>

To copy the hostname or secret again, or to change **Enable www domain**, open the row menu and click **Edit**.

<Frame>
  <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/zvGj8jWJIp1AX40D5AfyrlgtY.png" alt="Edit Photon Optimizer page with Photon Domain, Photon Secret, and Enable www domain" style={{ borderRadius: '0.5rem' }} />
</Frame>

## Point your site at Photon

Photon only converts or serves files requested through your Photon hostname. Point static URLs at `https://yourid.photoncache.com/`, using the **Photon Domain** you copied.

<Tabs>
  <Tab title="WordPress (LiteSpeed Cache)">
    In the WordPress admin, open **LiteSpeed Cache** → **CDN**.

    * Set **CDN URL** to your Photon hostname, for example `https://yourid.photoncache.com/`
    * Turn **Use CDN Mapping** on
    * Under **Original URLs**, add your site, for example `//example.com/`
    * Turn **Include Images** on if it is off

    If you also want CSS or JavaScript to go through Photon, turn **Include CSS** and **Include JS** on. Photon serves those files as they are. It does not minify or otherwise optimize them.

    <Tip>
      If the site uses both `www` and non-`www` URLs, add both in **Original URLs**, separated by commas.
    </Tip>
  </Tab>

  <Tab title="Magento">
    In Magento, go to **Stores** → **Configuration** → **Web** → **Base URLs (Secure)**.

    Set **Base URL for Static View Files** and **Base URL for User Media Files** to your Photon hostname, for example `https://yourid.photoncache.com/`.

    Static view files include CSS and JavaScript. Photon serves those as they are.
  </Tab>

  <Tab title="Other CMS">
    Point your media or CDN URL settings at your Photon hostname, for example `https://yourid.photoncache.com/`.

    Keep the mapping on the origin URLs that serve images (and any other static files you want Photon to deliver).
  </Tab>
</Tabs>

## Cache busting for CSS and JavaScript

If you route CSS or JavaScript through Photon on WordPress, install the [PerfGrid Optimizer](https://wordpress.org/plugins/perfgrid-optimizer/) plugin. It adds a cache buster when those files change, so visitors get the new files without a manual purge.

Skip the plugin if you only send images through Photon.

## Purge the cache

Converted images stay in cache for 365 days. Purge when you replace files and need Photon to pick up the change immediately.

On the Photon Optimizer overview, open the dropdown for the domain and click **Purge Cache**.

<Frame>
  <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/TCXUg4TuGeWVUm7LM38waC8si.png" alt="Photon Optimizer overview with the domain menu open, showing Edit and Purge Cache" style={{ borderRadius: '0.5rem' }} />
</Frame>

The purge runs in the background. You get a panel notification when it finishes, usually within a few seconds.

## FAQs

<AccordionGroup>
  <Accordion title="Will Photon change files on disk?">
    No. Originals stay untouched. Photon serves converted images on request.
  </Accordion>

  <Accordion title="How does it pick WebP vs AVIF?">
    Photon negotiates with the browser and serves the best supported format.
  </Accordion>

  <Accordion title="Is there a cap on how many images can be converted?">
    Photon Optimizer does not impose a separate conversion quota.
  </Accordion>

  <Accordion title="What happens after 365 days?">
    Cache entries expire. The next request can convert the image again. Use **Purge Cache** if you need a refresh sooner.
  </Accordion>

  <Accordion title="Does using another hostname hurt SEO?">
    Photon sends a canonical header toward your real hostname, so search engines treat assets as belonging to your domain.
  </Accordion>

  <Accordion title="Does Photon optimize CSS, JavaScript, fonts, or video?">
    No. It can deliver those files if you route them through the Photon hostname, but it only converts JPEG, PNG, and GIF images to WebP or AVIF.
  </Accordion>
</AccordionGroup>

## Related articles

* [Photon Optimizer logs](/docs/grid-hosting/logs/photon-optimizer-logs)
* [Stats](/docs/grid-hosting/stats/stats)
* [What's hosting-panel.net](/docs/grid-hosting/general/what-s-hosting-panel-net)
* [Recommended default settings for LiteSpeed Cache](/docs/general/wordpress/recommended-default-settings-for-litespeed-cache)
