Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image processing with Gatsby #1063

Closed
iAdramelk opened this issue Mar 17, 2020 · 5 comments
Closed

image processing with Gatsby #1063

iAdramelk opened this issue Mar 17, 2020 · 5 comments
Labels
A: website Area: website p1-important Active priorities to deal within next sprints

Comments

@iAdramelk
Copy link
Contributor

iAdramelk commented Mar 17, 2020

When we used Next.js we just placed all assets to the /static/img/ folder and inserted in html by url.

This approach works, but have some drawbacks:

  1. We can't automatically optimize images on build.
  2. We don't have cache busting.
  3. We can't crate different sizes of images for different resolutions on the fly.

Now, after migration we have better ways to do it:

  1. Use webpack loaders for images to import images directly is js. It will give us cachebusting and otimizations on build.
  2. Use gatsby image API to automatically resize images.
  3. Use gatsby's plugin for remark that will automatically resize and optimize images in doc pages.

Also, as we don't need to make image folder public with this approach, we should move images closer to the components or markdown files that use them.

@iAdramelk iAdramelk mentioned this issue Mar 17, 2020
27 tasks
@shcheklein shcheklein added website: eng-doc DEPRECATED JS engine for /doc migration labels Mar 17, 2020
@shcheklein shcheklein changed the title Image processing wsith gatsby image processing with Gatsby Mar 17, 2020
@shcheklein shcheklein added the A: website Area: website label Apr 9, 2020
@shcheklein
Copy link
Member

Also, as we don't need to make image folder public with this approach, we should move images closer to the components or markdown files that use them.

this can be done independently and should resolve the problem with gatsby-remark-relative-images which is now pinned at 0.2.3 and which we can not update.

@shcheklein shcheklein added the p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. label Apr 10, 2020
@shcheklein shcheklein added p1-important Active priorities to deal within next sprints and removed p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. labels May 7, 2020
@jorgeorpinel
Copy link
Contributor

I guess this is related to the Gatsby migration so will keep the label (last old issue with that label) but is it still relevant and/or can it maybe be implemented easily with the current version of Gatsby or some other module? Cc @rogermparent for ideas if any 🙂

@rogermparent
Copy link
Contributor

rogermparent commented Dec 20, 2020

We currently use an older version of the Gatsby image plugins due to issues between their newer caching API and our build process. There's been a lot of iterations on those plugins since then, so it may be worth trying an update in a PR to see if the cache behavior improvements also fixed our issue. If we are able to use the latest versions of those plugins, we'll get access to a slew of new features like that greatly improve DX like lazy queries/images and true parallel processing.

I can check into it when I get some time.

@rogermparent rogermparent mentioned this issue May 5, 2021
3 tasks
@jorgeorpinel jorgeorpinel added p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. p1-important Active priorities to deal within next sprints and removed p1-important Active priorities to deal within next sprints website: eng-doc DEPRECATED JS engine for /doc p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. labels May 6, 2021
@shcheklein
Copy link
Member

@rogermparent can it be considered done?

@rogermparent
Copy link
Contributor

Yeah, this ticket specifically seems like it can be considered long since done after the Next -> Gatsby migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website p1-important Active priorities to deal within next sprints
Projects
None yet
Development

No branches or pull requests

4 participants