Disable lightbox in post baking

I am interacting with Discourse via the APIs. The lightbox feature is giving our front-end a bit of a headache, and I would like to simply turn off that replacement. Is there a configuration point for that?

So far I have tried

  • setting SiteSettings.create_thumbnails to false
  • clearing all values for SiteSettings.responsive_post_image_sizes

Things I wanted to try but am not finding config points for:

  • Bumping up the value for something to be put in the custom field Post::LARGE_IMAGES

Other suggestions are appreciated (and sorry if this is the wrong category)

I’m pretty sure this can’t be disabled as it is a core feature.

I’ve just been looking into this myself as we’re building our own frontend and might not necessarily want the lightbox stuff.

FYI it gets added in CookedPostProcessor#add_lightbox!. You’ll need to modify the code through a plugin to stop this method being called.

The whole process starts with PostJobsEnqueuer which is called from the PostCreator (so whenever a post is created).