Measuring weak gravitational lensing (WL), a powerful probe of the distribution of large scale structure, is one of the primary science goals of Euclid and other future large extragalactic surveys with LSST and WFIRST. In order to reconstruct a three dimensional weak lensing map of dark matter in different redshift bins, it is crucial to constrain both galaxy shapes and photometric redshifts very well. Currently, the WL analysis has primarily been based on optical band imaging, limiting results to z<1; Euclid and LSST will detect cosmic shear with optical imaging over many thousands of square degrees. However, near-infrared (NIR) imaging has never been used for wide-field weak lensing measurement outside of cluster fields. In this talk, first, I will present the advantages of measuring galaxy shapes in the NIR with Euclid-quality images simulated from Hubble Space Telescope (HST) images. Second, I will introduce new galaxy templates that populate three-color space and are constrained by HST/CANDELS photometry. This new template library is a powerful tool to constrain photometric redshifts for Euclid and SPHEREx. I will conclude with plans for future work, which are closely related to sciences for Euclid and SPHEREx.