@sosojni Well I don't know what I'm missing, I don't know anything about nodebb, I've searched for image.js in my nodebb root installation and found 2 files. As I didn't know which one I had to edit, I changed both of them
nodebb:~$ find . -name "images.js" -print
./public/src/client/topic/images.js
./build/public/src/client/topic/images.js
nodebb:~$ vi ./build/public/src/client/topic/images.js
nodebb:~$ vi ./build/public/src/client/topic/images.js
The installed and activated the plugin
Then changed the line in
nodebb:~ cd /node_modules/nodebb-plugin-gallery
nodebb:~ find . -name "main.js" -print
./public/lib/main.js
Then reloaded nodebb but nothing happens concerning the images
still opening in separate browser tab.