Yes, it’s possible. The simplest approach is using CSS clip-path, which doesn’t require SVG masks or extra markup.
However, when using percentage coordinates in clip-path, the diagonal angle depends on the image’s aspect ratio, so it won’t always stay exactly 45°. In my example only square images generate 45° angles.
If you need a true constant 45° angle regardless of aspect ratio, you’ll need a more advanced approach using SVG clipping (often combined with JavaScript) to calculate the shape dynamically.
BTW just added the clip on lightbox, is cool!!
I set separate values to maintain the crop ratio between the image and the lightbox version