s3 image jade error
See original GitHub issueUsing s3 images, seems jade is throwing an error. I’ve properly set ‘s3 config’
Sorry, an error occurred loading the page (500)
/Users/jakeforaker/dev/keystone/templates/views/blog.jade:21
19| if post.image.exists
20| #{post.image}
> 21| img(src=post._.image.fit(160,160)).img.pull-right
22| p!= post.content.brief
23| if post.content.extended
24| p.read-more: a(href='/blog/post/' + post.slug) Read more...
undefined is not a function
If I comment out line 21, line 20 above will print out:
<{ url: '//keystonejakef.s3.amazonaws.com/3c757ddc6e0035df83cab497d3d70b24.jpg', filetype: 'image/jpeg', size: 1684603, path: '', originalname: 'IMG_2728.jpg', filename: '3c757ddc6e0035df83cab497d3d70b24.jpg' }>
How to render the image correctly in the jade template?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
AWS S3 - Image cannot be displayed because it contains errors
I'm attempting to upload profile images to my AWS s3 Bucket. At the moment I've got it so the file is appearing in...
Read more >404 when offloading media to S3 - Support - Themeco Forum
I've been in touch with the Offload media plugin developers directly. Now 100% of the images are offloaded: http://prntscr.com/mr9j4l. Those ...
Read more >How to fetch contents of JSON files stored in Amazon S3 using ...
Import the newly created javascript file into the routes file as shown in the image below. Paste the code into the router.get section....
Read more >Random-Access (Seekable) Streams for Amazon S3 in C#
Let's set the stage: Suppose I have disc image files in ISO format on Amazon S3 from which I need to extract some...
Read more >Unique id (key) not changing for every post call to upload the ...
Coding example for the question Unique id (key) not changing for every post call to upload the image in aws s3 and so...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jforaker as I suspected.
.fit
is an underscore method available on the cloudinaryimage fieldtype http://keystonejs.com/docs/database/#fieldtypes-cloudinaryimage not on the S3file fieldtype.In the future it would be nice to have these sorts of methods available on an
image
fieldtype using something like https://www.npmjs.com/package/resize Feel free to open up such an issue@morenoh149 Any chance this has been added by now?