It all depends on threads. Using only two cores, the i3 will be faster, to some extent (not the pure difference in speed)
Modern gaming is using more and more threads, and photo editing certainly does that too. An i3 is about equivalent to a three core i5 So in raw throughput, which is not a perfect guide, you would be comparing 3 x 4.0 (12) with 4 x 3.2 = 12.8 For equivalent throughput, the i3 would needs to reach 4.3 Ghz.
For now and the future, I'd go with the i5.
I'm assuming that you have a budget that limits you to i3 + Z170 board or i5 + H170 board. If you post your complete parts list, we may be able to get you i5 + Z170 board