Add image and category items to BlogArticle helper


Pages & Content
a year ago
a year ago


(Reporter: agibson, Assigned: pmac)



Firefox Tracking Flags

(Not tracked)




a year ago
For the creation of the new Firefox content hub pages, we're going to need a few new features added to the BlogArticle helper [1]

1.) We'd like to pull in a thumbnail image for each article (image URL)
2.) We'd like to pull in tags (categories) for each article
3.) We'd like to be able to display (x) articles based on (y) tag

For reference, a rough prototype of a hub page in question that would use this can be seen here (blogs section toward the bottom):

I think the best way to do this is to change how we consume our blogs. All of our blogs are run on a recent enough version of Wordpress that they all include v2 of the JSON API[0]. This will give us everything we want including tags, categories, and featured media.

For the images I recommend we store the URL and simply hotlink to the image hosted on our blog. "*" is already whitelisted in our CSP for images, so we can load images from This will be quick and easy to implement, and if we need to later we can improve things so that they're pulled in and processed. But Wordpress provides several sizes of each image via the API[1].

With all of the data from the API I can easily provide simple tools for filtering via tags and/or categories as well as getting a post thumbnail URL.

Assignee: nobody → pmac

Comment 2

a year ago
Commits pushed to master at
Bug 1353794: Add app to consume and store wordpress data

Fetches wordpress data via the JSON API. Fetches tags and
featured media if present as well.

Also add blog post generic view and QS methods to filter by blog and/or tags easily.
Merge pull request #4757 from pmac/better-wordpress-1353794

Bug 1353794: Add app to consume and store wordpress data

Comment 3

a year ago
Marking this as fixed, as what we have now seems to meet our current needs well. Thanks pmac!
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.