Photo pages

If you’ve uploaded photos and included them in blog posts, Micro.blog will create a page at /photos on your hosted blog automatically. You can rename or delete this page under Posts → Pages on the web.

Micro.blog only includes JPEGs for the photos page to help filter out screenshots which are usually PNGs. If you want to change this behavior, you can customize the photos template list.photoshtml.html using a new theme.

Micro.blog sets 2 special parameters in Hugo that are accessible from a custom theme:

  • .Params.images — includes JPEGs or PNGs
  • .Params.photos — only includes JPEGs

The default templates shared between all themes are also available on GitHub here.

@manton Does M.b create any thumbnails? I’d like to speed up the photos page a bit by loading slightly smaller images if at all possible.

Thanks for this. Two hopefully quick questions:

  1. I don’t see that page. Where and how might I begin troubleshooting. I tried creating a /photos/ page but none of the photos I loaded are visible.
  2. If I want to change the parameters to incude all images, is that adjustment in the code something I do in side my custom CSS option (edit custom theme, edit CSS, etc), or do I have to clone the theme entirely and upload it unique for my blog?

@lukemperez Manton also posted an announcement of the feature, which might help.

This is on my to do list of things with which to play around. There is an entire section within the Hugo documentation on image processing.

Id really like to make this page load quicker, a simple solution would be to add in some pagination.

You can add pagination via the config.json file (I think?), but you can also load thumbnails rather than full-sized images. I asked above how to do it, and didn’t get a public reply. But I did include it in my blog post.

https://micro.blog/photos/480x/{{URL TO IMAGE GOES HERE}}

An example from my themes:

{{ range first 1 .Params.photos }}
          <img src="https://micro.blog/photos/480x/{{ . }}">
{{ end }}
1 Like

Is there a way to create multiple photo pages? For instance, for or based on manually selected categories? I want to post images of different kinds, like memes, space visuals, and then some life stuff. Having them all in one photo page doesn’t make sense. If not multiple photo pages, then perhaps we can create albums/collections to tuck photo posts in? That’d work too.

There are category pages automatically created if you assign a category. For example, I have a category page for my dog pictures. You get those automatically by assigning a category and can add category pages to your nav. If you want to customize them to look more like the photos page, you’ll need to customize your theme template.

Yes, this is what I am going to do. But a category view is a list of posts text-style, not a photo page. What I’m asking for is a way to have multiple photo pages or albums (which maybe more useful for the public at large) without having to fiddle with templates.

I’d say you’re asking for a way to have an entire feature set of Flickr inserted into Micro.blog, and therefore this is a bad idea… however, this is already happening, since Bookshelves is that for Goodreads. So… I guess? IDK it feels like Micro.blog has the potential to just be confused and bloated at this rate and it’s quite worrying.

Perhaps a simpler solution could be providing a grid view for category pages in general? Then people like me can make photo collections easily by assigning categories or those who make comics say can have a Comics blog, and so on. All this without changing the way photos work on the platform. Thoughts?

Have you looked at all the available themes? Cypress is explicitly a portfolio-based theme. It may already do what you want. It’s also quite simple to use any Hugo theme with some adjustments.

I don’t think this is a distinct feature, it’s just a distinct theme use. The community can build and contribute themes.

One theme that may work for a use case may not work for another, especially considering that a micro blog is a collection of many different things, not just focused on one topic. At least that’s how I see it. A feature, on the other hand, is universal and is simply available for all users regardless of their technical and fiddling abilities.

There is a whole separate app for photos (Sunlit) so you could justify having new photo-based features.

I do like how flexible Micro.blog is, with regard to the aforementioned capacity to do this kind of thing using themes. From that POV, making this a universal category switch then makes themes more complicated; now you would be able to set this either at the settings-level (category) or the site-level (themes) and that would be a thing to take into account when customising a theme, or making themes in general.

Whilst it’s good to make things easy for as many people as possible, that is also how you end up on the path to WordPress, Facebook, Google, etc. I think there is a degree to which we have to be comfortable with expecting people to learn things, otherwise why even bother other than to use the convenient alternatives.

Maybe if theme editing in particular was improved there would be less of a need for this as a universal setting?

I strongly disagree with this view, regardless of my feature request being useful or not. I don’t think being easy to use for as many people as possible is necessarily incompatible with being useful with many features for the target audience.

Speaking for myself, I use micro.blog not because of its many features or flexibility, but because it’s unique in its core mission. And if micro.blog’s mission is to empower more people to blog, then we can’t afford to have the view that every micro.blog user is inherently expected to learn the technical side of things. If only techies used the platform, not only the platform itself doesn’t become easier to use overall but it also loses perspectives from the large majority of people who aren’t “techies” but love to blog and share their passion with the Web.

I never said that.

Thanks for your thoughts, everyone. I think we’re all basically on the same page with this, but maybe saying it in different ways. One of my goals for this year is to just fine-tune the features that are already there, making them more stable instead of adding completely new features (with admittedly the occasional digression like Bookshelves).

As an example for photos, the default Photos page is great if it works exactly how you want, but it’s difficult to customize. It’s possible we could make this more flexible while still keeping the defaults as simple as they are now.

I also think extra apps and plug-ins are a good answer for a lot of these questions. Micro.blog’s “New Post” screen is designed around text + photos at the end of the post, and many people have asked for more sophisticated layouts with text and photos mixed together in different ways. We’ve resisted doing that to keep posting simple and microblog-focused, but Sunlit, Mimi Uploader, Quill, and other solutions can fill that in.

Is there a way to remove the Photo page from the menu without deleting it? The checkbox for not showing a page seems to be disabled for the Photos page for some reason. Not sure if it’s a bug or intentional. Either way, I’d like to keep the photo page but not show in the nav.