# \[Fixed\] Plesk | Collection images not loading — api.php blocks /images/ paths + double api.php URL

**URL:** <https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780>\
**Category:** Plesk\
**Tags:** cms\_collection\
**Created:** [June 17, 2026, 12:18pm UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780 "2026-06-17T12:18:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martinus\_Visser](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/martinus_visser/32/665_2.png) [@Martinus\_Visser](https://community.sitejet.io/u/Martinus_Visser)\
**Post date:** [June 17, 2026, 12:18pm UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780/1 "2026-06-17T12:18:37Z")

</div>

**Bug 1 — api.php blocks /images/ paths**

In api.php (generated by Sitejet on every publish), this line:

$isAllowedGet = $requestMethod === ‘GET’ && preg\_match(‘#^/(form\_container|collection|website)/#’, $url);

…only whitelists form\_container, collection, and website as valid GET paths. The “images” path is missing. Any request to /api.php/images/… is rejected — api.php returns an empty response instead of proxying the image.

Fix: add |images to the regex:

$isAllowedGet = $requestMethod === ‘GET’ && preg\_match(‘#^/(form\_container|collection|website|images)/#’, $url);

Since api.php is overwritten on every Sitejet publish, this fix is lost each time. There is no permanent server-level workaround — we currently have to make api.php read-only to preserve the fix, which is not sustainable.

* * *

**Bug 2 — Double /api.php/ prefix in image URLs**

When a collection page loads, Sitejet’s JavaScript fetches collection data via /api.php/collection/… (correct). The API response includes image paths that already contain /api.php/images/… The JavaScript then prepends the api base URL again, resulting in:

/api.php/api.php/images/800x800/{fileId}/{filename}.jpg

Instead of the correct:

/api.php/images/800x800/{fileId}/{filename}.jpg

This is visible in the browser Network tab on any collection item page.

* * *

**Why some images can be partially fixed and others cannot**

Images that Sitejet has synced to the local /images/ directory can be served with a server-side .htaccess rewrite as a workaround. However, newer listing images that exist only in Sitejet’s cloud (not on the local server filesystem) return 404 at every local path (/images/0/, /images/800x800/, /images/1920/, etc.). These images must go through api.php to be proxied from the CDN. Since api.php blocks /images/ paths, these images are completely inaccessible and no server-side workaround can fix them.

Example page where cloud-only images are broken: [Elementen 38 - Woningaanbod: overzicht - Greenfield Makelaardij | Makelaar & Bouwconsultancy Randstad](https://greenfieldmakelaardij.nl/woningaanbod-overzicht/elementen-38-zeewolde/) (Media tab)

* * *

**Steps to reproduce**

1. Set up a Sitejet website with a collection containing images (e.g. real estate listings)
2. Publish to a Plesk server
3. Open any collection item page and check the image/media tabs
4. Open browser DevTools → Network tab → filter by “api.php”
5. All image requests return 404

* * *

**Requested fixes**

1. Add “images” to the allowed GET paths in api.php — this is a one-line change and resolves the proxy blocking permanently
2. Fix the client-side URL construction so image paths from the collection API response are not prefixed with /api.php/ a second time

Both fixes are needed. Fix 1 is critical for images that only exist in Sitejet’s cloud. Fix 2 prevents the double-prefix issue that requires server-side rewrites as a workaround.

---

<div class="post-metadata">

**Author:** ![Andre](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/andre/32/3459_2.png) [@Andre](https://community.sitejet.io/u/Andre)\
**Post date:** [June 17, 2026, 12:38pm UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780/2 "2026-06-17T12:38:31Z")

</div>

Nice, @Martinus_Visser. 👊

I have marked this as a Plesk issue and forwarded it to the colleagues there. Did you also sent a ticket to Plesk as per advice from Martin?

---

<div class="post-metadata">

**Author:** ![Martinus\_Visser](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/martinus_visser/32/665_2.png) [@Martinus\_Visser](https://community.sitejet.io/u/Martinus_Visser)\
**Post date:** [June 18, 2026, 9:10am UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780/3 "2026-06-18T09:10:51Z")

</div>

Hi Andre,

I did send the same message to Plesk, awaiting reply… 👌

---

<div class="post-metadata">

**Author:** ![Franzi\_Sitejet\_Team](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/franzi_sitejet_team/32/2381_2.png) [@Franzi\_Sitejet\_Team](https://community.sitejet.io/u/Franzi_Sitejet_Team)\
**Post date:** [June 19, 2026, 2:47pm UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780/4 "2026-06-19T14:47:18Z")

</div>

Hey @Martinus_Visser, we just pushed a fix. Could you ensure that you update your Sitejet Builder extension on your server - if it doesn’t auto-update and then publish your website again and check if your blog images are visible?

---

<div class="post-metadata">

**Author:** ![Martinus\_Visser](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/martinus_visser/32/665_2.png) [@Martinus\_Visser](https://community.sitejet.io/u/Martinus_Visser)\
**Post date:** [June 22, 2026, 9:01am UTC](https://community.sitejet.io/t/fixed-plesk-collection-images-not-loading-api-php-blocks-images-paths-double-api-php-url/5780/5 "2026-06-22T09:01:52Z")

</div>

Hi Franzi!

I think the update did the job!

Thanks!
