What I am going for
I have an image, that needs to appear inside a polygon. The hot pink area is the image.
What I have tried
Using SVG triangle shapes (100% wide) that are laid on top and bottom of the image. Top-left triangle on top and bottom-left at the bottom.
It works great but there seems to be rendering issues on many browsers where you see a random line around the SVG. (see image below, could be a separate question by itself)
I have also tried using skewed/rotated elements on top and bottom. But since the element is responsive, on certain resolution, the skewed elements create gaps. (see image below)
What I could try
Using images. Many problems there. It would be my last resort. Images are not resolution independent, I would have to use huge images for the slants to look good on high dpi screens, which would have to be scaled down in browsers, all not good.
Where I need help
Looking for any other way I could achieve this effect, preferably CSS based solution.