Phoebe Bridgers was everywhere this year; Better Oblivion Community Center with Conor Oberst, her cover of The Goo Goo Doll’s “Iris” with Maggie Rogers to celebrate Trump’s defeat, but most importantly her solo album with this impressive multi-faceted and deeply touching “I know the end”.
lang:en
Blogposts on blog.futtta.be in English (mostly because these posts are republished in a non-Dutch-speaking context).
Music from our Tube: Black Country, New Road – ‘Science Fair’
A song I Shazammed twice in the last couple of days when hearing it on PBB and which I’ve just now listened to 5 times already as it really is that intense, angry, chaotic, poetic and … well, good? The video is pretty great as well! Black Country, New Road – ‘Science Fair’
Fixed: WordPress 5.6 required Autoptimize settings change
PSA: WordPress 5.6 changes the filename of jQuery core. If you’re using Autoptimize and you have jQuery excluded (which is default) you will want to update your JS optimization exclusion list from js/jquery/jquery.js
to js/jquery/jquery.min.js
.
Update: Autoptimize 2.8 will automagically fix this, urgently looking for some testers to download https://github.com/futtta/autoptimize/archive/beta.zip (make sure 2.7.8 is disabled when enabling the beta). If all goes well and I get some confirmation the update (which has a lot more then just the fix) will go out today!
Update2: AO28 was released, all is (or should be) OK now 🙂
Santa wrapping up Autoptimize 2.8!
I’m sure you have been good this year so Santa cannot but put a nice ribbon around the next version of Autoptimize, out later this month. These are the most important changes:
- JavaScript: new option “defer but don’t aggregate” which *might* help with “total blocking time”
- Images: add field to list images to be excluded from image optimization
- Critical CSS: major improvements of the job processing mechanism, reducing time spent from up to 1 minute to just a couple of seconds.
- Critical CSS: under “advanced options” replace “request limit” with “queue processing time limit” (default 30s).
- Extra | Google Fonts: better parsing of version 2 Google Font URL’s (/css2/).
- Misc. other minor fixes, see the GitHub commit log
In case you want to give Santa a hand with all that wrapping up, you can always download the Beta version here and take it out for a spin.
LYTE: change in YouTube API caching behavior
As mentioned earlier here, Google checks YouTube API usage and can cancel a project/ API key if there are no API requests for 90 days. Based on the fact that earlier post received more hits the last week and people asking on the WordPress support forum, I went back to the drawing board code editor and added logic for LYTE’s cached YouTube API responses to expire after 2 months, causing somewhat regular requests to YouTube which should keep Google happier with the API usage.
Obviously if you have page caching (which you should) this can have an impact as well, as a cached page will not result in LYTE “seeing” the request, so the cached YouTube data would not get refreshed even if older then 2 months. Then again having such aggressive page caching would likely cause other issues (nonces in forms becoming invalid and such), so I *think* the one month margin (results cached for 2 months whereas Google wants activity in 90 days) should suffice.
For those who don’t like the cache to expiry of if you want more or less then 2 months; I added 2 filters allowing you to tweak with a bit of code. Returning false
to lyte_ytapi_check_cache
will make LYTE function as before (no cache expiry) and the cache expiry threshold can be changed using the lyte_ytapi_cache_gracetime
filter.
And like blogposts concerning LYTE, here’s a video to show it action: Yves Tumor with “Gospel for a New Century”. Weird stuff I admit (you have been warned), but good weird really …
Vote like your democracy depends on it!
A simple message during these troubling and important times (and not just for the USA by the way);
Artwork by PlusOneCraft as found on redbubble.com.
Question for you: what are Open Source’s values?
So open so(u)rcerers; what in your opinion are the core values you think are essential for the success of the open source ecosystem (be it WordPress or other)?
Scratching my own itches; my online radio player
I’ve never been into iTunes or Spotify, tuning into online radio-stations instead to satisfy my constant need for musical discovery, excitement and/ or entertainment. For a long time I was an avid KCRW listener, but times change and their eclecticism does not necessarily match mine the way it used to, so over the last couple of years many online streams (Worldwide FM, Nova, TSF Jazz, KCSN, Laurent Garnier’s PBB, …) were added to my favorites which I stored in a draft mail in Gmail of all places, accessing that file on my different devices and -where available- using VLC to play them.
But VLC isn’t available everywhere (hello “smart” TV), it is not great to manage a collections of streams and copy/pasting URL’s from that draft mail is clumsy, so after creating a simple webpage with an HTML5 audio element for my wife to listen to the local “Radio 1 classics” stream on our TV, I decided to extend that to display a list of streams to choose from with a minimum of vanilla JavaScript to do the actual switching and just a dash of CSS (still struggling with vertically aligning multiline titles in those inline-blocks, but I don’t mind that too much. No really, I’m not nervous about that whenever I see it, not at all!).
The result (at https://futtta.be/r/) is an unattractive but pretty usable mp3 stream player that I use on 4 different locations and which I can update easily to accommodate my wife’s knack for doo-wap and xmas-music. Maybe I should add falling snow-flakes to surprise her when we put up the Christmas tree? 🙂
Autoptimize with support for AVIF images
You probably have heard about AVIF already, but if not; it is a new image format which is based on the AV1 video format and generally has superior compression than the better-known WebP, JPEG, PNG and GIF formats. Avif is currently supported by Chrome & Opera and can be enabled by setting the
image.avif.enabled
flag in Firefox.
So now you know what it is you may want to use it on your WordPress site? In that case -and the title kind of gives it away- the freshly released Autoptimize 2.7.8 now has support for AVIF if you have image optimization active. Just as for WebP Autoptimize hooks into the lazyload JavaScript to detect if your visitor’s browser supports AVIF and will switch the requests to the ShortPixel CDN to that format if so. If AVIF is not support but WebP is, the requests will be for WebP images and if those are not supported old-fashioned JPEG’s will be loaded.
So there you have it, AVIF is now available in WordPress!
Want to test AVIF images with Autoptimize’s Image Optimization?
So AVIF is a new(ish) image format that promises even better optimization then WebP and is supported in desktop Chrome & behind a preference in Firefox; go to about:config
and set image.avif.enabled
to true.
If you are using Autoptimize to optimize your images and you want to test AVIF images, you can use below code snippet to do so;
add_filter('autoptimize_filter_imgopt_webp_js', function(){return '<script data-noptimize="1">function c_img(a,b){src="avif"==b?"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABoAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACJtZGF0EgAKCBgADsgQEAwgMgwf8AAAWAAAAACvJ+o=":"data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==";var c=new Image;c.onload=function(){var d=0<c.width&&0<c.height;a(d,b)},c.onerror=function(){a(!1,b)},c.src=src}function s_img(a,b){w=window,"avif"==b?!1==a?c_img(s_img,"webp"):w.ngImg="avif":!1==a?w.ngImg=!1:w.ngImg="webp"}c_img(s_img,"avif");document.addEventListener("lazybeforeunveil",function({target:a}){window.ngImg&&["data-src","data-srcset"].forEach(function(b){attr=a.getAttribute(b),null!==attr&&-1==attr.indexOf("/client/to_")&&a.setAttribute(b,attr.replace(/\/client\//,"/client/to_"+window.ngImg+","))})});</script>';});
Use the the code snippets plugin to add this (easy and safe) or if you’re adventurous add it to your theme’s functions.php.