rewrite gallery with big images limit