mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
03818e642a
This introduces new APIs for obtaining optimized thumbnails for topics. There are a few building blocks required for this: - Introduces new `image_upload_id` columns on the `posts` and `topics` table. This replaces the old `image_url` column, which means that thumbnails are now restricted to uploads. Hotlinked thumbnails are no longer possible. In normal use (with pull_hotlinked_images enabled), this has no noticeable impact - A migration attempts to match existing urls to upload records. If a match cannot be found then the posts will be queued for rebake - Optimized thumbnails are generated during post_process_cooked. If thumbnails are missing when serializing a topic list, then a sidekiq job is queued - Topic lists and topics now include a `thumbnails` key, which includes all the available images: ``` "thumbnails": [ { "max_width": null, "max_height": null, "url": "//example.com/original-image.png", "width": 1380, "height": 1840 }, { "max_width": 1024, "max_height": 1024, "url": "//example.com/optimized-image.png", "width": 768, "height": 1024 } ] ``` - Themes can request additional thumbnail sizes by using a modifier in their `about.json` file: ``` "modifiers": { "topic_thumbnail_sizes": [ [200, 200], [800, 800] ], ... ``` Remember that these are generated asynchronously, so your theme should include logic to fallback to other available thumbnails if your requested size has not yet been generated - Two new raw plugin outlets are introduced, to improve the customisability of the topic list. `topic-list-before-columns` and `topic-list-before-link` |
||
---|---|---|
.. | ||
about_stats.rb | ||
activation_reminder_emails.rb | ||
auto_expire_user_api_keys.rb | ||
auto_queue_handler.rb | ||
badge_grant.rb | ||
bookmark_reminder_notifications.rb | ||
category_stats.rb | ||
check_out_of_date_themes.rb | ||
clean_up_associated_accounts.rb | ||
clean_up_crawler_stats.rb | ||
clean_up_deprecated_url_site_settings.rb | ||
clean_up_email_logs.rb | ||
clean_up_exports.rb | ||
clean_up_inactive_users.rb | ||
clean_up_post_reply_keys.rb | ||
clean_up_search_logs.rb | ||
clean_up_unmatched_emails.rb | ||
clean_up_unmatched_ips.rb | ||
clean_up_unsubscribe_keys.rb | ||
clean_up_unused_api_keys.rb | ||
clean_up_unused_staged_users.rb | ||
clean_up_uploads.rb | ||
create_missing_avatars.rb | ||
dashboard_stats.rb | ||
destroy_old_deletion_stubs.rb | ||
destroy_old_hidden_posts.rb | ||
directory_refresh_daily.rb | ||
directory_refresh_older.rb | ||
disable_bootstrap_mode.rb | ||
drop_backup_schema.rb | ||
enqueue_digest_emails.rb | ||
enqueue_onceoffs.rb | ||
enqueue_suspect_users.rb | ||
ensure_db_consistency.rb | ||
ensure_s3_uploads_existence.rb | ||
fix_user_usernames_and_groups_names_clash.rb | ||
grant_anniversary_badges.rb | ||
grant_new_user_of_the_month_badges.rb | ||
heartbeat.rb | ||
ignored_users_summary.rb | ||
invalidate_inactive_admins.rb | ||
migrate_upload_scheme.rb | ||
pending_queued_posts_reminder.rb | ||
pending_reviewables_reminder.rb | ||
pending_users_reminder.rb | ||
periodical_updates.rb | ||
poll_mailbox.rb | ||
process_badge_backlog.rb | ||
purge_deleted_uploads.rb | ||
purge_expired_ignored_users.rb | ||
purge_old_web_hook_events.rb | ||
purge_unactivated.rb | ||
reindex_search.rb | ||
reviewable_priorities.rb | ||
schedule_backup.rb | ||
tl3_promotions.rb | ||
top_refresh_older.rb | ||
top_refresh_today.rb | ||
unsilence_users.rb | ||
update_heat_settings.rb | ||
version_check.rb | ||
weekly.rb |