Click-to-Enlarge Images Within Articles

Last Updated -

It's true that pictures paint a thousand words. But sometimes, large pictures can be difficult to see when scrunched into an article. Wouldn't it be great to give your users the ability to click any image to view it full screen without your content team having to write or manage any custom code? We have a solution for you! 

Before we get started, here's an example of this solution in action: 

 

To get started, edit your current default web theme and then switch to the Advanced Themes mode of the editor. On the left side, click into the Page (Article) section. Scroll to the very bottom, and paste in this code.

Once pasted in, you're almost done. At the very bottom of the code, you'll see this line: 

​$(".support-body.support-article img").magnificPopup({

Modify this CSS selector so that you're properly selecting each image within your article body. This varies from site to site based on any previous customizations to your support center you've done, so grab a frontend web developer if you need help with this step, or feel free to email into support@desk.com and we can help too. 

And that's it! Save your changes and click into an article with images to test.