# I uploaded some images to the post via the API, why do only some images have the lightbox effect?

**URL:** https://meta.discourse.org/t/api/385834
**Category:** Support
**Tags:** rest-api, lightbox
**Created:** [October 16, 2025, 12:39pm UTC](https://meta.discourse.org/t/api/385834 "2025-10-16T12:39:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![昊毅\_周](https://avatars.discourse-cdn.com/v4/letter/%E6%98%8A/48db29/32.png) [@昊毅\_周](https://meta.discourse.org/u/%E6%98%8A%E6%AF%85_%E5%91%A8)
#### Post date: [October 16, 2025, 12:39pm UTC](https://meta.discourse.org/t/api/385834/1 "2025-10-16T12:39:11Z")

</div>

> **[\[DDJ00001\]道德寶章(宋)葛長庚注(元)趙孟頫書](https://openttc.com/t/topic/74)**
>
> 资源下载 右键单击书名-选择-在新标签页中打开链接（或按住Ctrl键后点击书名） 道德宝章(宋)葛长庚注(元)赵孟頫书.pdf (509.2 KB) 版权声明 本资源由逍遥子整理与 http://www.homeinmists.com 仅供个人学习研究之用，版权属于原著作权人所有。 请参阅GNU许可证：http://www.gnu.org/licenses/licenses.zh-cn.html OpenTTC提供全球高速下载服务（Cloudflare Pro...

Please see this post.  
I uploaded some images using an automated script via the admin API.  
However, only a small portion of the images have a lightbox effect.  
The images have the same length, width, and aspect ratio.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [October 17, 2025, 1:42pm UTC](https://meta.discourse.org/t/api/385834/2 "2025-10-17T13:42:40Z")

</div>

Can you share the api call you are using to create the post with the image link?

If you rebuild the html for a post does it create the lightbox?

 ![CleanShot 2025-10-17 at 07.49.32@2x](https://global.discourse-cdn.com/meta/original/4X/1/4/8/14802213573c4974ce9c55a844a1b9733eaba62a.png)

Also if you manually create some posts with images just like your api calls do, does it not make light boxes for some of them? Trying to figure out if this is an api issue or if the same issue exists in the UI.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [October 25, 2025, 6:46pm UTC](https://meta.discourse.org/t/api/385834/3 "2025-10-25T18:46:44Z")

</div>

@昊毅_周 were you able to resolve your issue?

---

<div class="post-metadata">

### Author: ![昊毅\_周](https://avatars.discourse-cdn.com/v4/letter/%E6%98%8A/48db29/32.png) [@昊毅\_周](https://meta.discourse.org/u/%E6%98%8A%E6%AF%85_%E5%91%A8)
#### Post date: [October 27, 2025, 8:49am UTC](https://meta.discourse.org/t/api/385834/4 "2025-10-27T08:49:23Z")

</div>

The problem still cannot be solved by rebuilding HTML.

---

<div class="post-metadata">

### Author: ![昊毅\_周](https://avatars.discourse-cdn.com/v4/letter/%E6%98%8A/48db29/32.png) [@昊毅\_周](https://meta.discourse.org/u/%E6%98%8A%E6%AF%85_%E5%91%A8)
#### Post date: [October 27, 2025, 8:50am UTC](https://meta.discourse.org/t/api/385834/5 "2025-10-27T08:50:09Z")

</div>

I think it should be resolved.  
My automation script didn’t have a delay at first, but then I added a 200ms delay to each API call. All the images are now normal.  
Thank you!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 26, 2025, 8:51am UTC](https://meta.discourse.org/t/api/385834/6 "2025-11-26T08:51:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
