set the correct branch for the extension template Gemfile
Use includes instead of eager_load to ensure images are returned in correct order.

Fixes #5513