Is Uploading Non-Mahram Women’s Photos on Websites Haram?

Assalamu-Alaikum! My name is Rahamt Ali. I am a professional website designer and developer. I have been working in this field for the last 5 years. Recently, I learned that uploading pictures of non-mahram women on websites is considered haram (forbidden). I try to filter content accordingly, but many times, I find myself in situations where uploading pictures of non-mahram women is necessary. In such cases, would my work be considered completely haram? Should I leave this aspect of my work?

Additionally, I have another question: is designing websites for lawyers halal or haram?

Jazakallah Khair