The questioner asks this: What is your advice?
For one tested with watching pornographic images and films?
O Allah, my Lord, Ever-Living. O Sustainer, Maker of heavens and earth.
O Allah, heal his heart, Lord of the worlds.
O Allah, keep him from this trial. Lord of the worlds.
My advice to myself and my brothers is that the eye is a blessing from Allah.
It is one of Allah's greatest blessings on us, renewed every second.
So we should use it in obedience to Allah.
And not use it in disobedience to Allah.
And we should know: whoever uses Allah's blessings to disobey Him.
Will soon lose it as a blessing, even if it remains.
The second matter is to remind ourselves.
That we will be questioned about this eye.
Before Allah ﷻ.
When you sit in your room, there is no one there.
No one is there. And you are looking.
Remember that you will stand before Allah.
And He will ask you about this eye and about what you saw.
"Each of you will be spoken to by his Lord, with no interpreter.
He'll look right. He'll see only what he sent ahead.
He'll look left. He'll see only what he sent ahead.
"And he will look before him and see only the Fire." Remember this.
And the third matter is to remember that Allah is with him.
Allah sees him and hears him. And knows him. Allah is with him.
With His hearing and His sight and His knowledge.
So when you are alone and looking at these films and obscenities.
Remember that Allah sees you now.
And Allah knows your condition so do not say, "I am alone."
Rather, remind yourself that Allah sees you.
It is mentioned that one of the Salaf favored one student over the rest.
So the students asked him and he wanted to show why he chose him.
Then he gave each one a bird and said, "Slaughter it where no one sees you."
The students went off and returned next day; all but him had killed theirs.
He said, "So-and-so, what did you do?" "I went here, and here, and here."
And you, so-and-so, why didn't you obey?
He said: Whenever I went somewhere I knew that Allah was watching me.
So I found no place where no one could see me.
So he said, "That is why I love him."
Before Allah, the noblest of you is the most pious.
So we should remember this: Allah ﷻ sees us.
Then, my brother, time moves on and passes, in obedience or sin.
By Allah, time has not stopped for one who obeys or who sins.
Remind yourself: if you endure these minutes, they'll pass sinless.
And if you commit this sin, it passes in sin, corrupting your heart.
It will constrict your life and cause you misery.
You may be denied blessings because of this.
So remind yourself of this, then remember.
The eye will testify against you.
The eye will testify against you for what it saw.
Before Allah ﷻ.
So fear Allah ﷻ and revere Allah's majesty.
If you do this, by Allah's power and strength, you'll defeat Iblis.
Also, supplicate often.
O brothers, anyone afflicted by a sin should come before Allah ﷻ late at night.
My Lord, have mercy on me. My Lord, You know my state best.
My Lord, I have been afflicted by this disease. O Allah, make me hate it.
O Allah, distance me from it as You distanced east from west.
Casting yourself down and sincerely turning to Allah best mends your state.
My brother, this question of yours is a sign of goodness.
and that you seek good and want to be free of it.
Pray at night; night's arrows don't miss. Fall before Allah ﷻ in prostration.
My Lord, my Lord, my Lord, save me from this affliction, my Lord.
Make me hate it, my Lord. Make me loathe it, my Lord.
Distance me from it, as You distanced east from west.
And Allah is All-Hearing, the One who answers.
Near to His servants, He does not turn away one who is sincere.
And He is shy to turn away His sincere servant's supplication.
So seek refuge, seek refuge in Allah ﷻ. And Allah ﷻ knows best.