amazon web services - Angular 4 sending extra request for picture element with remote sources -


i developing angular 4 application , using picture element holding images respective pixel densities (1x, 2x, 3x..). storing images in amazon s3, requesting them on oninit() method , using property binding srcset element set source.

here's code picture element,

<picture>     <source srcset="{{image1xwebp}} 1x, {{image2xwebp}} 2x, {{image3xwebp}} 3x" type="image/webp"/>     <source srcset="{{image1xdef}} 1x, {{image2xdef}} 2x, {{image3xdef}} 3x" type="image/png"/>     <img [src]="image2xdef"/> </picture> 

but in chrome developer console, in network tab, see additional request before image request

name: 1x (or 2x or 3x depending on downloading photo), status: 200, type: 'text/html url: localhost:3000/1x not requesting url anywhere in code.

it doesn't happen when store images locally, instead of amazon s3.

and doesn't happen when statically write url in picture element

<picture>     <source srcset="https://s3.some_url.amazonaws.com/some_url/photo-1x.webp 1x, https://s3.some_url.amazonaws.com/some_url/photo-2x.webp 2x" type="image/webp"/>     <source srcset="https://s3.some_url.amazonaws.com/some_url/photo-1x.png 1x, https://s3.some_url.amazonaws.com/some_url/photo-2x.png 2x" type="image/png"/>     <img src="https://s3.some_url.amazonaws.com/some_url/photo-1x.png"/> </picture> 

when see rendered code, dynamically getting urls, similar statically written urls. please explain me, why happening , me resolve issue?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -