An optical fiber displacement gauge has been used to fabricate a compact yet highly precise instrument for measuring magnetostriction in thin films. The principle of measurement and the device itself are described. The instrument allows the sample and measuring unit to be integrated for greater compactness. Highly precise measurements are possible, and the magnetostriction can be computed directly from measured displacements without need for special calibration. By using two types of probes with oriented film samples, λ100 and λ111 can be determined independently. The magnetostriction of polycrystalline Ni thin films that served as standard samples was measured and the results were found to be close to those reported elsewhere.