You haven't actually added the cg to the button in your init python block
If you look at the original template code:
g.button("cg_2")
g.unlock_image("cg_2")
You have the first line creating the button and the next one adding the image. If you don't add an image, the thumbnail won't show up.
Generally I'd recommend going through the documentation regarding the gallery, to make sure you have everything needed: Here