Add media redirect for feature images as well

Be careful with profile-pics though!
This commit is contained in:
Hippo 2019-10-11 13:47:42 +05:30
parent 2611aa208d
commit 80ab94b373

View file

@ -30,7 +30,7 @@ const Post = ({ data, location }) => {
<Layout hasFeatureImage={ post.feature_image }>
{ post.feature_image ?
<figure className="post-feature-image">
<img src={ post.feature_image } alt={ post.title } />
<img src={ post.feature_image.replace(new RegExp(config.mediaUrlFrom, 'g'), config.mediaUrlTo) } alt={ post.title } />
</figure> : null }
<div className="container">
<article className="content">