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.

Image processing plugin

See original GitHub issue

It would be nice to have a plugin that can take a source image and output various optimized formats, leveraging srcset and the like to enable responsive images.

As far as I can tell, this is blocked by https://github.com/lovell/sharp/issues/2583 which is blocked by upstream Deno support.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
enjikakacommented, May 11, 2021

Hm, instead of resize maybe re-use srcset but without urls and add that in while transforming?

In:

<img src="image.jpg" srcset="300w, 500w, 769w">

Out:

<img src="image.jpg" srcset="image_360w.jpg 300w, image_500w.jpg 500w, image_769w.jpg 769w">

At first glance that feels like an easier API for an end-user, at least if familiar with srcet from before. That would need a check against exernal images though. The resize attribute option is better in that way; that it being defined or not would be checked for, instead of the src. data-srcset as input has the same pro, with the added benefit that the input doesn’t have an invalid srcset or invalid attribute name.

3reactions
oscaroterocommented, Mar 6, 2021

I’ve used sharp in other node projects and it’s an incredible library, and a Deno version would allow us to create plugin similar to Eleventy (https://www.11ty.dev/docs/plugins/image/)

For now, the only way is a script on “afterBuild” event, for example using imagick:

site.addEventListener("afterBuild", "convert -resize 800x800 _site/*.jpg");

But definitelly, if sharp is ported to Deno, we will have a image processing plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins categorized as image processing
Easily post-process images using the AI-powered autoRetouch platform! Remove backgrounds, retouch skin, apply custom backgrounds…
Read more >
Image Processing Plugins, Code & Scripts
Get 116 image processing plugins, code & scripts on CodeCanyon such as Image Processing Tool, IP Camera Streaming and Image Processing, Prestashop Perfect ......
Read more >
Pelican plugin that automates image processing
Image Process is a plugin for Pelican, a static site generator written in Python. Image Process let you automate the processing of images...
Read more >
Plugins
Capturing plugin (Captures images on Windows using JMF) Webcam Capture (Video capture on OS X, ... Immunohistochemistry (IHC) Image Analysis Toolbox
Read more >
Plugins tagged with: image-processing
Name SENSUM Earth Observation Tools — 13351 pktools — 12570 Processing kernel for geospatial data Processing kernel for geospatial data Processing ker...
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