Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not served properly #55

Open
Pato94 opened this issue Dec 29, 2020 · 3 comments
Open

Images not served properly #55

Pato94 opened this issue Dec 29, 2020 · 3 comments

Comments

@Pato94
Copy link

Pato94 commented Dec 29, 2020

I'm experiencing the same issue described here. I'd like to test this solution, but right now I'm using this component, and as far as I know it does not provide any configuration to specify these content-types.

I looked into this file and I noticed the server is not being created with any parameter.

My workaround is going to be not using this component and creating the server myself, but I'd like to use this component in the future. Is it possible to add this content-types as a configuration parameter?

@gjgd
Copy link

gjgd commented Jan 3, 2021

I'm also experiencing the same issue with serving images through the express component

@nemani
Copy link

nemani commented Apr 8, 2021

Hey any updates on this ?! I have been pulling out my hair trying to understand why i cant display images.

@nemani
Copy link

nemani commented Apr 9, 2021

Fixed it!
you need to set the env variable for the binary_content_types to change the return for isBinary()

component: express
name: express-starter

inputs:
  src:
    src: ./
    hook: npm run build
    dist: build
  timeout: 30
  memory: 1024
  env:
    FONTCONFIG_PATH: '/var/task/fonts'
    BINARY_CONTENT_TYPES: 'image/png, image/jpg'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants