<p>I use Docker to package the Angular project (container use Nginx). When running on Docker, the images shows up ok, but when deploying to Kubernetes, using Ingress, all images in the <code>assets</code> folder do not appear.</p>

<p>Content-Type running on Docker. It's OK:</p>

<p><a href="https://i.stack.imgur.com/9qPUh.png" rel="nofollow noreferrer">Link Image</a></p>

<p>But when running on Kubernetes. Content type always is text/html:</p>

<p><a href="https://i.stack.imgur.com/MitKR.png" rel="nofollow noreferrer">Link Image</a></p>

<p>Config Ingress Kubernetes. Service name <code>ssite</code>.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: abc-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: "swing-static-ip"
    ingress.kubernetes.io/force-ssl-redirect: "true"
    ingress.gcp.kubernetes.io/pre-shared-cert: "abc,xyz"
spec:
  rules:
  - host: abc.com
    http:
      paths:
      - backend:
          serviceName: sservice
          servicePort: 8000
  - host: xyz.com
    http:
      paths:
      - path : /
        backend:
          serviceName: ssite
          servicePort: 80
      - path : /*
        backend:
          serviceName: ssite
          servicePort: 80
</code></pre>

<p>In your nginx config set <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type" rel="nofollow noreferrer">default_type</a> directive </p>

<blockquote>
  <p>Defines the default MIME type of a response. Mapping of file name
  extensions to MIME types can be set with the types directive.</p>
</blockquote>

<pre><code>server {
   ...
   default_type text/html;

   location /assets/imgs {
      default_type image/png;
   }

   location /assets/imgs {
      default_type image/jpeg;
   }
}
</code></pre>
