question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server Side Rendering Images

See original GitHub issue

Even though the docs do a good job of explaining server side rendering clearly and effectively.

Unfortunately, the images throw an error when rendered on the server side.

I am using react-redux and redux-thunk (default) middleware with react-router.

I am curious as to what is causing this error:

SyntaxError: /~/src/img/logo.png: Unexpected character '�' (1:0)

Thanks in advance, Chris

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timdorrcommented, Jun 19, 2016

You’re looking for file-loader. @kentcdodds’ Webpack course is free on Egghead.io this weekend too: https://egghead.io/courses/production-webpack-working-title

0reactions
timdorrcommented, Jun 19, 2016

file-loader gives you back a URL to the external asset. If you need it in base64 form, then you want url-loader.

But regardless, this isn’t the right place for this kind of support. Please ask over on Stack Overflow or Reactiflux (which has a good webpack channel).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to render images with react on server side?
How can I render images and css files on server side with React? Here is my server code: const express = require('express') const...
Read more >
There is no Wrong Way to Render an Image - LinkedIn
When you talk to most people about rendering an image, ... There are generally two types of rendering, client-side and server-side.
Read more >
Server-Side Image Rendering with Express Handlebars
In this article, I will show you a quick way to handle images when doing server-side rendering. Just to note, I am using...
Read more >
Render html and next Image from Server Side Rendering
Hello community !!! I want to display a header with some text and a Image (obtaining its src) all with Server Side Rendering...
Read more >
Server Side Rendering - Cross Platform - Apache ECharts
Server Side Rendering. Normally, Apache ECharts TM renders the chart dynamically in the browser and will re-render after user interactions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found