[buddypress-trac] [BuddyPress Trac] #6650: Optimizing Media with the Attachment Library

buddypress-trac noreply at wordpress.org
Fri Oct 16 01:40:44 UTC 2015


#6650: Optimizing Media with the Attachment Library
-------------------------------------+------------------------------
 Reporter:  edfullman1               |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Component - Attachments  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback        |
-------------------------------------+------------------------------

Comment (by boonebgorges):

 > All of these plugins basically work the same way with the exception of
 S3-Uploads. Basically none of them can handle the avatars and cover
 photos, only media files stored with posts.

 At a glance, it looks like S3-Uploads ought to be able to handle BP
 uploads. It filters `wp_upload_dir()`, replacing WP's native file storage
 with an `s3://` stream wrapper. This ought to "just work". I'll try to
 find some time to test it myself, but maybe in the meantime you can say
 more about what you mean by "dynamic files in the upload directory". Does
 this just mean files that are not represented by an attachment-post and
 the associated metadata?

 It'd be an interesting exercise to make BP uploads work with the other S3
 plugins *without* requiring the standard WP media treatment for BP
 content. It'd definitely be possible to fake the creation of attachment
 metadata - or perhaps to *actually* create it, and then immediately delete
 it after S3 has done its thing - without needing `post_type=attachment`.
 `wp_get_attachment_url()` obviously doesn't work without a post. It'd be
 easy enough to write a wrapper that made it work, though I know that the
 goal is to make it completely seamless with these drop-ins.

 I'm pretty wary of going down the road of using WP's standard attachment
 functions for BP content. Stuff like cover photos doesn't seem like
 appropriate content for the Media Library. Adding it there will add a ton
 of bloat to `wp_posts` and `wp_metadata`. And it'll mean that we have to
 do various tricks to keep that content *out* of the regular Media Library
 view, since you presumably will not want to see thousands of avatars when
 finding a picture of your cat to embed in a blog post :) So, if there's a
 lightweight way to work alongside these S3 plugins without resorting to
 the full Media Library treatment, it'd be strongly preferred.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6650#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list