Closed jrock2004 closed 2 years ago
I see this issue as well. Happened during some upgrades, here: https://github.com/NullVoxPopuli/website/pull/44
@jrock2004 @NullVoxPopuli I believe you likely upgraded to ember-responsive-image
v2, which had breaking changes.
I tracked that here, if anyone wants to take a shot at fixing it: https://github.com/empress/empress-blog-casper-template/issues/39
The fix shouldn't be too difficult, it's just a matter of having time to go through the migration steps.
So you are saying if I downgrade to version 1.0.1, it should be fixed again?
Yes, in the short-term.
Yeah, just confirmed this will work. I will look to see if I can help fix so we can go back to 3.x
That would be great! The ticket I linked has a link to the migration steps, so if you're able to work out how to update the Casper template I'll happily work with the Empress team to ensure a release goes out with the fix once it's available.
So it seems like the first thing that needs to happen is move the following from config dir to ember cli build
'responsive-image': {
sourceDir: 'images',
destinationDir: 'responsive-images',
quality: 80,
supportedWidths: [2000, 1000, 600, 300],
removeSourceDir: false,
justCopy: false,
extensions: ['jpg', 'jpeg', 'png', 'gif']
},
Trying to remember how to do that for addons
@elwayman02 Where is the component in the add-on that uses
@jrock2004 you'll want to checkout and do a code search on the empress-blog-casper-template
repo. For some reason GH search isn't returning results properly, but here's a link to one of the instances: https://github.com/empress/empress-blog-casper-template/blob/master/addon/templates/components/post-card.hbs#L5
Ah so there are 2 projects we would need to update to fix this
This project doesn't actually have a direct usage of ResponsiveImage, it just has the config because its demo app uses the casper template linked above. So you'll want to make all your fixes over in that repo, and once we release that version we can bump and update the config here in empress-blog. The config itself is a consumer-side change that every instance of empress-blog (your app, for example), will need to make when upgrading to the latest version of the casper template, IIRC.
For example, I have mine here: https://github.com/elwayman02/hella-drunk/blob/master/config/environment.js#L50-L58
The one that lives in this repo doesn't impact your app at all, it's only used for the in-repo demo app.
Almost ready to PR this. Last thing I just need to figure out is how to put the config in ember-cli-build.js
instead of config/environment
@elwayman02 Can you look at the PR I created and see if there are things I need to change
The error I get solely by configuring responsive-image in my app is this:
Error occurred:
- While rendering:
-top-level
application
index
post-card
link-to
responsive-image
There was an error running your app in fastboot. More info about the error:
Error: Assertion Failed: No image argument supplied for <ResponsiveImage>
at assert (/tmp/broccoli-3088664I5hNZz16mtcJ/out-578-broccoli_merge_trees/assets/@ember/debug/index.js:178:1)
at new ResponsiveImageComponent (/tmp/broccoli-3088664I5hNZz16mtcJ/out-578-broccoli_merge_trees/assets/addon-tree-output/ember-responsive-image/components/responsive-image.js:75:1)
at EmberGlimmerComponentManager.createComponent (/tmp/broccoli-3088664I5hNZz16mtcJ/out-578-broccoli_merge_trees/assets/addon-tree-output/@glimmer/component/-private/base-component-manager.js:37:1)
so, if anyone runs in to that, I believe we have to fix a bunch of stuff in the empress/template stuff before we'll be compat with the modern responsive-image addon (which is great, because webp, low-res rendering, etc. -- must have for good loading perf)
@jrock2004's PR seems good over here 💯
I believe this is resolved with latest casper template?
Not sure what is causing this but noticed my blog is no longer working and I see this error in console when I try to load the page
Seems like it has to do with images that are put in image meta tag. If I remove that then I do not get these errors