I pray you are well and in the best of health.
No, the fast will not be broken in such a scenario nor will any expiation be required.
The fast is only broken by the [a] entrance of something with a perceptible body (like food, water, and the like) [b] into the body cavity [c] through a recognized point of entry (such as the mouth or nose) while [d] remembering that one is fasting, namely not in a state of forgetfulness. These are the general considerations, though there are many specifics which you may find answers to on SeekersGuidance.
Therefore, even if a person looked at pornographic material and ejaculated as a result of such looking, his fast will not be broken. However, this relates to ejaculation without the act of masturbation. Masturbation that leads to ejaculation nullifies the fast, though it does not require expiation. [Shurunbulali, Imdad al-Fattah; Ibn `Abidin, Radd al-Muhtar]
Pornography & Masturbation
The above is the bare-bone legal ruling on the matter relating to the validity or invalidity of one’s fast. However, there is no doubt that the viewing of pornography and the act of masturbation are impermissible and major sins in Islam. It is, as Shaykh Nuh Keller says, “throwing acid” on the roots of one’s spiritual development, and its harms manifest both on an individual and societal level.
Allah Most High states in the Qur’an, “Say to the believing men that they cast down their looks and guard their private parts; that is purer for them; surely Allah is Aware of what they do.” [24: 30] He Most High also says, “He knows the stealthy looks and that which the breasts conceal.” [40: 19] The Prophet (Allah bless him and grant him peace) stated, “The two eyes, their zina is the [lustful] glance.” [Nawawi, Riyadh al-Salihin]
The first thing that a person with a porn addiction should do is recognize the problem, then turn to Allah in sincere repentance. This involves:
[a] To desist from the sin
[b] Feeling remorse for commiting the sin,
[c] Making a firm resolve not to commit it again.
One should constantly reaffirm one’s repentance and realize that the mercy of Allah Most High extends beyond measure. The Qur’an states, “Say: O my servants who have acted extravagantly against their own souls, do not despair of the mercy of Allah; surely Allah forgives the faults altogether; surely He is the Forgiving the Merciful.(39:53-54).
At the same time, active measures should be taken to avoid falling into the sin again, such as not staying on the computer to late at night, avoiding television and images, engaging in worship and the remembrance of Allah, maintaining good company rather than remaining in isolation, and recalling death and our ultimate goal as the creation of Allah. An individual should try to make some of these as daily habits in this blessed month of Ramadan, which is a month where the desires of the nafs can be shattered and good traits acquired.
Wasalam