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.

s3 image jade error

See original GitHub issue

Using 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:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
morenoh149commented, Aug 28, 2015

@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

0reactions
tomtom87commented, Jul 16, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

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