5. RASTER IMAGES
ā¢ āNormal imagesā
ā¢ JPG, PNG, GIFā¦
ā¢ Image is a grid of pixels
ā¢ Use for pictures
6. VECTOR IMAGES
ā¢ Icons, graphs, maps etc
ā¢ Format: SVG
ā¢ Has instructions āØ
how to draw the image
ā¢ Scales to any size without being blurry
7. RAW IMAGES
ā¢ Modern ānegative ļ¬lmsā (a type of raster, too)
ā¢ You can set digital camera to save images as raw
ā¢ In this format you can edit the colors and lightning
better
ā¢ File size many times bigger than normal raster
images
ā¢ Save as JPG etc before displaying
8. IMAGE DATA
ā¢ The actual picture
ā¢ Filename: owl.jpg
ā¢ EXIF data:
ā¢ Camera info: ISO, shutter speed, rotation etc
ā¢ Location (See: I know where your cat lives)
ā¢ Creation time
ā¢ Copyright, credit, caption
9. FILE SIZES
ā¢ SVG < Raster < RAW
ā¢ SVG: complexity, minifying
ā¢ Raster: Dimensions and compression
ā¢ Filesize goes up exponentially as dimensions
grow bigger
11. HOW TO UPLOAD?
1. From āMediaā
2. While writing
3. With (S)FTP
4. Import
12. ATTACHMENT POST TYPE
ā¢ Media ļ¬les (images, video, audio, documents
etc.) are saved as āattachmentsā
ā¢ EXIF data, description, title, alt texts are saved in
database
ā¢ The ļ¬le goes by default to /wp-content/uploads/
or /wp-content/uploads/2017/4/
14. IMAGE SIZES
ā¢ WordPress generates multiple image sizes
ā¢ Sizes are generated when image is uploaded
ā¢ Default: Large (1024x1024), Medium (300x300),
Thumbnail (150x150), Full size
ā¢ You, plugins and themes can add their own and
modify default sizes
15. IMAGE CROPPING
Full sizeāØ
2000 x 1333āØ
Soft cropāØ
500 x 500āØ
āFit these boundsā
Hard cropāØ
500 x 500āØ
āBe this sizeā
16. MY āGOLDEN STANDARDā
FOR IMAGE SIZES
ā¢ Large: full width of text column and as tall as it
happens to be
ā¢ Example: 720 x 3000, soft crop
ā¢ Medium: half width of the text column and as tall
as it happens to be
ā¢ Example 360 x 1500, soft crop
17. REGENERATING āØ
EXISTING IMAGES
ā¢ Existing images wonāt change if you add or
modify sizes later
ā¢ Youāll need to regenerate sizes
ā¢ Plugin: Force Regenerate Thumbnails
ā¢ WP-CLI: wp media regenerate
18. MANUAL CROPPING
ā¢ Plugin: Manual Image Crop
ā¢ Default: crop to center
ā¢ With plugin you can decide āØ
where to crop each size
ā¢ Custom crops reset whenāØ
regenerating image sizes :(
19. SANITISING FILE NAMES
ā¢ File names are somewhat sanitised: āØ
spaces to dashes
ā¢ Scandic letters ƤƶƄ are not
ā¢ Broken images in Safari
ā¢ Plugin: WP Sanitize Accented Uploads
21. CAPTIONS AND ALT TEXTS
ā¢ Captions (text under theāØ
image)
ā¢ Alternative text: contextāØ
and meaning (visible toāØ
screen readers and āØ
search engines)
ā¢ Sami Keijonen: Writing Accessible Content
22. IMAGES IN CONTENT
ā¢ Images, video, audio etc can be embedded to
content
ā¢ You can choose size, alignment,āØ
captions, link
ā¢ Upload new images or selectāØ
from media library
23. GALLERIES
ā¢ Built-in support for galleries
ā¢ Choose columns, sizes, āØ
captions, links
ā¢ [gallery] shortcode
ā¢ Themes and plugins canāØ
extend and style themāØ
24. RESPONSIVE IMAGES
ā¢ Let the browser decide which image size to use
(Retina, mobile, desktop)
ā¢ WP adds alternative versions automatically with
srcset parameter in content
ā¢ Thereās functions and ļ¬lters to do it in theme /
plugin
25. SLIDESHOWS / CAROUSELS
ā¢ Bad for: important things, text, news, offersāØ
Good for: additional images, galleries
ā¢ See: Should I Use Carousels
ā¢ Plugins: many (no recommendations)āØ
Themes: many (no recommendations)āØ
JS libraries: many
26. LIGHTBOXES
ā¢ Open full size image in overlay
ā¢ Turns links to image toāØ
light boxes automatically
ā¢ Plugins: WP Lightbox 2,āØ
Simple Lightbox etc
27. VIDEO THUMBNAILS
ā¢ Plugin: Video Thumbnails
ā¢ Make featured image from āØ
embedded video
ā¢ Works with Youtube, Vimeo, āØ
Facebook, Twitch etc.
28. AUTO POST THUMBNAIL
ā¢ Plugin: Auto Post Thumbnail
ā¢ Makes the ļ¬rst image from content the featured
image if it isnāt set by user
ā¢ Thatās it
30. DEFAULT FILTERS
ā¢ By default: ļ¬lter date, media type or search
ā¢ Finding images can be difļ¬cult
ā¢ Would folders solve everything?
31. MEDIA CATEGORIES
ā¢ Plugin: Enhanced Media Library
ā¢ You can create you own taxonomies like
ā¢ Theme: people, landscape, logo
ā¢ License: our, image bank, public domain
ā¢ One image can belong to many taxonomies
32. CATEGORIES AND TAGS TO
IMAGES
ā¢ Plugin: Enhanced Media Library
ā¢ You can use the same tags and categories in
images as posts
ā¢ You can display all the images added to certain
category
33. MIME TYPES (MEDIA TYPES)
ā¢ Plugin: Enhanced Media Library
ā¢ You can control what kind of ļ¬les can be
uploaded
ā¢ You can also ļ¬lter by these types
34. IN THE END, ITāS UP TO YOU
ā¢ Plugins like Enhanced Media Library give you the
tools
ā¢ You need to consistently use them and ļ¬gure
how to organise images
ā¢ There is no one right way
36. COMPRESSION
ā¢ Running images through algorithms to make their ļ¬le size smaller
ā¢ Losless (a bit) / lossy (much)
ā¢ WP does a little with ā82ā rate (very high quality)
ā¢ Advanced compression requires some things installed in the
server
ā¢ Compression as service: WP Smush, Imagify, TinyPNG, EWWW
Image Optimizer etc.
37. CDN
ā¢ Moving images to faster server or Content
Delivery Network
ā¢ Is it worth it: ĀÆ_( )_/ĀÆ
ā¢ Some examples: Jetpack, Amazon Cloudfront,
Google App Engine etc.
38. LIMIT FULL SIZE IMAGE
ā¢ Users might upload crazy big images āØ
(like 6000x6000)
ā¢ You can resize the full size image to safe space
(and loading time if it is used)
ā¢ Plugin: Imsanity
39. LAZY LOADING
ā¢ Idea: Load the image only when user scrolls to it
ā¢ Plugin: Lazy Load (and many others)
ā¢ Pros: Initial page load is fast
ā¢ Cons: Really just delays page weight, UX:
āimages jump aroundā
40. USING SMALLER IMAGES
ā¢ Big images = lot to load
ā¢ Slow: full screen images, big slideshows etc.
ā¢ Donāt use bigger image than you need:
responsive images
ā¢ You can also use fewer images
41. SPEED ISNāT JUST FILE SIZES
ā¢ Load time is sum of many things: server
response time, database queries, cachesā¦
ā¢ Thereās no set limit how many / big images you
can use
ā¢ Optimising images wonāt ļ¬x everything
44. ADDING WATERMARKS
ā¢ You can add your logo/name/website in image
ā¢ If image is copied, you will have credit
ā¢ You can apply watermark āØ
to your images and āØ
backup original versions
ā¢ Plugin: Image Watermark
45. IF I WAS PHOTOGRAPHERā¦
ā¢ Iād avoid uploading HQ images and have smaller
web versions available
ā¢ Iād add automatic Watermark to images
ā¢ I would add copyright info to EXIF data
(remember the caption and copyright info in
image ļ¬le)
46. RESTRICTING ACCESS
ā¢ Normal uploads are accessible with correct URL: WP
canāt control the access
ā¢ Plugins can create alternative upload directories that
are only available through their control
ā¢ Selling images, showing images only to logged in
ā¢ Plugin: Easy Digital Downloads, WooComemmerce,
Download Monitor, Download Manager etc.