Fix truncation (JSON db) and decoding (SQLite) of photo thumbnail urls