370written posts
offlinecurrently
So apparently .webp files are much smaller and relatively lossless, so I feel less like the Internet collectively changed file types to .webp specifically to cater to NFT dudebros and more like an idiot for jumping to that conclusion in the first place, dfljkdhsfkjdhfkjdsh. Still wish they'd open in my image viewer program, though, hhhhhhh.i recently learned how to use webp!! you can open them with your browser, like just drag + drop to chrome or firefox. you can make your browser the default program associated with the .webp extension so that you can double-click on the file to open it immediately. to make them was slightly more convoluted than i'd hoped, but still not bad. there's actually a photoshop plugin: helpx.adobe.com/photoshop/kb/support-webp-image-format.htmlOR the method i've been using is the CLI. you can install it with homebrew on mac: www.ticktechtold.com/install-convert-images-into-webp-mac/here's some other options, and the official page on google developers: www.hongkiat.com/blog/webp-guide/developers.google.com/speed/webpand FINALLY to actually use it on a web page, this MDN article and another article by jason grigsby were very useful in putting it all together: developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_imagescloudfour.com/thinks/responsive-images-101-definitions/this is an example with graceful degradation that i'm using, though i'm not sure if i'm using the `sizes` attr correctly: <picture> <!-- Preferred --> <source type="image/webp" srcset="banner.1920x600.webp 1920w, banner.1400x600.webp 1400w, banner.1200x400.webp 1200w, banner.928x400.webp 928w" sizes="100vw">
<!-- Fallback for browsers that don't support webp --> <source type="image/jpeg" srcset="banner.1920x600.jpg 1920w, banner.1400x600.jpg 1400w, banner.1200x400.jpg 1200w, banner.928x400.jpg 928w" sizes="100vw">
<!-- Image element where the browser selects and loads an image from the options above, or loads a default if it doesn't support the <source> element --> <img alt="Landscape photograph of Utah's Salt Lake Valley." src="banner.928x400.jpg"> </picture> kind of an info dump sry. hope that's helpful to someone!
|
last edit on Oct 9, 2022 23:16:32 GMT by elli
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
|