---
title: "Sizing up your images with Sindre"
publication: "Node Weekly"
issue: 509
published_at: "2023-11-07"
canonical_url: "https://nodeweekly.com/issues/509"
---

Plus Deno lets you use npm, Node 20 goes default on Heroku, and telling a text file from a binary one. |        

#​509 — November 7, 2023 

[Read on the Web](https://nodeweekly.com/issues/509)   

Together with [![WorkOS\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_514,h_98/e_make_transparent/co_white,e_outline:9/tdfxwgk852ui9leli4wm.png)](https://workos.com/?utm_source=coopernode&utm_medium=newsletter&utm_campaign=q42023)  

![Node.js Weekly](https://res.cloudinary.com/cpress/image/upload/v1653576619/lgfqinzbdqttwmhvljxb.png) 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/letrqljiohs8niwv1gvo.jpg)](https://github.com/lirantal/awesome-nodejs-security)  

[Awesome Node Security: A Curated List of Node Security Resources](https://github.com/lirantal/awesome-nodejs-security) — Includes links to libraries like [Helmet](https://www.npmjs.com/package/helmet) (which just had a new release a few hours ago), educational resources, tools, and even stories of incidents like [the left-pad incident](http://left-pad.io/) (which, somehow, was a whole seven years ago!) 

Liran Tal   

🖼 [image-dimensions: Get the Dimensions of Images](https://github.com/sindresorhus/image-dimensions) — Sindre’s latest creation is a simple but comprehensive one. A way to get the size (as width and height in pixels) for JPEG, PNG, APNG, and GIFs in _any_ modern JavaScript environment. He seeks PRs to add JPEG XL, HEIC, WebP support if you have experience in those areas. 

Sindre Sorhus   [![\](https://copm.s3.amazonaws.com/fbc40856.png)](https://workos.com/?utm_source=coopernode&utm_medium=newsletter&utm_campaign=q42023) 

[Need to Offer SSO to Your Customers? Use WorkOS](https://workos.com/?utm_source=coopernode&utm_medium=newsletter&utm_campaign=q42023) — WorkOS lets you quickly build enterprise features like SAML & SCIM. Integration is seamless with beautiful API docs and SDKs. Join hundreds of companies using WorkOS—including Vercel, PlanetScale & Webflow—and make your app Enterprise Ready today. 

WorkOS sponsor   

[Building AI Apps with LangChain and Node.js](https://developer.salesforce.com/blogs/2023/11/building-ai-applications-with-langchain-and-node-js) — Discover the basics of building a Retrieval-Augmented Generation (RAG)-powered application using the [LangChain framework](https://js.langchain.com/docs/get_started/introduction/) (a popular framework for working with LLMs available in both Python _and_Node). 

Julián Duque   

_IN BRIEF:_ 

- [Deno 1.38 has been released](https://deno.com/blog/v1.38) and takes Node.js compatibility even further by [allowing the use of `npm`](https://deno.com/blog/v1.38#nodejs-compatibility-improvements) (or `pnpm`) to install packages.
- In other 'runtimes that aren't Node' news, [Bun v1.0.10](https://bun.sh/blog/bun-v1.0.10#node-http-gets-14-faster) has just landed too, with a 14% faster `node:http` (a compatible wrapper around `Bun.serve`).
- [Node.js v20.x is now the default version](https://devcenter.heroku.com/changelog-items/2708) on Heroku.
- If you're a VS Code user, get excited: [support for moving editors into floating windows](https://github.com/microsoft/vscode/issues/10121#issuecomment-1790316086) is on the way.
- If you have any interest in making a Node app work as a Windows service, [Jakob Wärnhjelm's experimentation](https://github.com/jakobwarnhjelm/webapp-to-winservice) may save you a lot of time.
- 🇪🇺 [NodeConf EU](https://www.nodeconf.eu/) is taking place _right now_ in Ireland. I'm seeing a _lot_ of [love](https://twitter.com/nomadtechie/status/1721862823695839424) for the talks so far – fingers crossed we get to share some videos soon.
- Node hasn't got its new mascot yet, but the [Eleventy static site generator does.](https://www.11ty.dev/blog/mascot-david/)   

[How to Build a Server-Side React App Using Vite and Express](https://thenewstack.io/how-to-build-a-server-side-react-app-using-vite-and-express/) — A demo of server-side rendering and server-side data fetching without using a full-on framework — showing what React-powered frameworks actually do. 

Paul Scanlon   

[Best Practices for Bootstrapping a Node App Configuration](https://www.lirantal.com/blog/best-practices-for-bootstrapping-a-node-js-application-configuration) 
Liran Tal   

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/enz7lli4supcxyxczuyf.jpg)](https://github.com/bevry/istextorbinary)  

[Is Text or Binary? 7.0](https://github.com/bevry/istextorbinary) — It first tries to determine from a filename if the contents of the file are _likely_ to be binary or text. Failing that, it then looks at the actual data to figure it out. 

Bevry   

[Super Expressive: Build Regexes in a Fluent, 'Natural Language' Style](https://github.com/francisrstokes/super-expressive) — A library for building regular expressions using an ‘almost natural language’ approach. It feels a little _too_ verbose for me, but it’s certainly readable. There’s also [an online playground](https://nartc.github.io/ng-super-expressive/) where you can experiment. 

Francis Stokes   

[You Look Like You Could Use a T-Shirt. And a Better Auth Provider](https://fusionauth.io/download?utm_source=nodeweekly&utm_medium=newsletter&utm_campaign=freeshirt-1030) — Spin up a local instance of FusionAuth in just 5 minutes. Send us a screenshot and we’ll send you a t-shirt. It's free. 

FusionAuth sponsor   

[log-update 6.0: Logging by Overwriting the Previous Output](https://github.com/sindresorhus/log-update) — Imagine a `console.log` that just overwrites itself on the same line each time. Perhaps for rendering progress bars, animations, etc. 

Sindre Sorhus   

[node-datachannel 0.5: libdatachannel Bindings for Node](https://github.com/murat-dogan/node-datachannel) — `libdatachannel` is a standalone C++17-based implementation of various WebRTC standards, as well as WebSockets, for use on POSIX platforms. 

Murat Doğan   

- [Google Cloud SQL Node.js Connector 1.1](https://github.com/GoogleCloudPlatform/cloud-sql-nodejs-connector) – Work with Cloud SQL instances from Node.
- [setup-node 4.0](https://github.com/actions/setup-node) – Set up a GitHub Actions workflow with a specific Node version.
- [unix-permissions 6.0](https://github.com/ehmicky/unix-permissions) – Helper library for working with POSIX file permissions.
- [node-llama-cpp 2.8](https://github.com/withcatai/node-llama-cpp) – Run AI models locally with Node.js `llama.cpp`bindings.
- [temporary-path 1.0](https://github.com/sindresorhus/temporary-path) – Get a random temporary path / directory.
- [Nightwatch.js 3.3](https://github.com/nightwatchjs/nightwatch) – Integrated end-to-end testing framework.
- [file-type 18.6](https://github.com/sindresorhus/file-type) – Detect the file type of a buffer.      

📰 Classifieds   

📢 See if you qualify for $2,400 in Temporal Cloud credits and access to support and services with our new [Temporal Cloud for Startups program](https://t.mp/49lYYXa).       

**_NOTABLE QUOTABLE_**  

“Maintaining an open-source project is like being a flight attendant for an airline where all tickets are free and the majority of customer surveys offer suggestions on how to fly the airplane.” 

___
Kelsey Hightower [#](https://twitter.com/kelseyhightower/status/958349496076742658)     

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. _Thanks!_ 

--- 

**Sponsorship:** Email `[kristina@cooperpress.com](mailto:kristina@cooperpress.com)` for details. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Cancel your subscription](https://nodeweekly.com/leave/*|UID|*) or [change your address](https://nodeweekly.com/edit_subscription/*|UID|*).
