It depends what the gradient in the input image represents, i.e. what the model is supposed to learn and what the loss represents, which is used to calculate the gradient.
If you want to change the input data in order to reduce the loss, your approach might work.
However, since there don’t seem to be any constraints, I guess your input image might look “unnatural” after a few iterations.