Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
blank

How to WordPress JSON Media & show it with Flutter Web

Posted on January 15, 2021May 4, 2023 by Toma Velev

I’ll continue my previous articles about Consuming WordPress JSON API, Tags and Categories by showing you how to Grab the Media (probably mostly Images) from the JSON API of a WordPress Web Site. The Endpoint for Images is: https://<wp>/wp-json/wp/v2/media?[offset=<0,10,20>]. It has the following – more complex Data Model:

WordPress Media

Important and probably most used fields of this complex object are:

  • media_type – what it the type of the WordPress Media content
  • mime_type may be useful in some scenarios for more technical and detail functionality or requirements.
  • source_url – the URL for the best Quality
  • alt_text – the hint/tooltip/title used in browsers and in mobile applications to indicate what is the image about. Adding this property to images is a must for greater accessibility. In some situations the images are not displayed so, alt attribute is considered required.
  • post – if the image is a logo of some article
  • author – the WP User that has uploaded the image
  • date/date_gmt/modified/modified_gmt – dates of creation or modification
  • There is a media_details object containing width and height fields – that show how big is the original content [for images].
    • The JSON contains several identical objects in the “sizes” sub-object of media_details. They store the thumbnails of the image for the different locations and sizes.
      Media Details

You could open a Flutter Web Application that loads the last 10 images from this site – on this address: https://programtom.com/dev_examples/wp_media/.

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (87)
    • Flutter Apps (26)
    • GPT (4)
    • Java (39)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (36)
    • Utils (15)
    • Vaadin 24+ (28)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Post Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)