Praise be to Allah.
Every Muslim is obliged to keep away from these images and movies which provoke desire and push one to do sinful actions such as masturbation or adultery, so that this avoidance will be a means of protecting oneself against prohibited things.
There is no doubt that watching them and persisting in doing so is a major sin, because there is no minor sin if one persists in doing it.
The one who persists in doing it is regarded as having fallen into major sin because of his persistence, unlike the one who sees it just once, such as an accidental glance and the like; in that case it is regarded as a minor sin.
The same applies to masturbation; if it happens just once in order to reduce the pressure of desire, Allah may pardon that because it is a minor sin, but persisting in it is a major sin.
For more details, please see the following answers:
The prohibition on masturbation is not from a medical point of view only
Will persisting in sin lead to kufr of indifference?
Comment