Make pictures in comments bigger when clicking on them

Johannes Genberg Posted in Technical Support 5 years ago

When you upload a picture in a comment, the picture gets shrunked. Which is perfect, but it stays shrunked. Is there a way to be able to click on the picture to see a bigger version of it?

Replies
se Johannes Genberg Replied 5 years ago

Yeah, I can't program for sith :)

us Rishi B Replied 5 years ago

yeah, it could be made into a component, I just never bothered doing that since the code changes were fairly small. If you want to make it into a component, feel free though.

se Johannes Genberg Replied 5 years ago

I guess that makes sense. But can't you upload them in the component section?

us Rishi B Replied 5 years ago

I think I actually did submit those changes to the official github repository, but they opted not to merge the changes in since this does depend on having the fancybox component. I still think it'd be a better idea to not resize images with or without the fancybox component though.

se Johannes Genberg Replied 5 years ago

Yes, those two files did the trick. They should be uploaded to this site so people can easier find them :)

se Johannes Genberg Replied 5 years ago

Great work! I will take a look later :D

us Rishi B Replied 5 years ago

yeah, I made a post about this a while ago. It's in my profile. It's fairly easy to remove the code that resizes the image so that images in comments still look good when expanded.

the code is here: https://www.opensource-socialnetwork.org/discussion/view/2951/clicking-on-images-in-comments-fancybox