Images not showing on ios when using S3 with redirects

Hello everyone,
I’m having a problem with multiple images on IOS when using regular <img [src]=“url”> tag. Images are served by rails backend with amazon S3 (rails redirects with 302 to amazon s3 urls). In our app some images have been randomly not showing app, so i inspected requests in Safari and it turns out, that the requests are showing up as Mime type txt.

The first request gets 304, and the second requests get 304 (instead of 302 and then 200 as on android and in chrome browser). As a temporary fix i added a pipe that adds timestamp=${} to every img url, which prevents ios from caching, but that’s a terrible approach i guess (works as a hotfix).

Any ide what is going on and how to fix it?

Im using angular 9.1.4, and capacitor 2.4.0. I also have ionic-image-loader set up, which i deprecated, but images that don’t show up are regular tags, which shouldn’t be a problem I guess