[buddypress-trac] [BuddyPress Trac] #8581: Extending no content activities with images and call of actions
buddypress-trac
noreply at wordpress.org
Thu Nov 18 22:18:29 UTC 2021
#8581: Extending no content activities with images and call of actions
--------------------------------------+---------------------
Reporter: vapvarun | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 10.0.0
Component: Activity | Version:
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback |
--------------------------------------+---------------------
Comment (by oztaser):
Hi @vapvarun
First of all thanks for working on this! I'm not sure is it the right time
to give feedbacks about the patch but I have a few. Please ignore if
you're still working on any of them.
1. Storing image data as base64 in the database feels me is not the best
way. It'll increase the storage requirement by 33% [ 1 ]. It will cause
extra load to MySQL and object cache storage. I understand the reason of
storing images in database, we want to show previous images on activities
but we really need that? I'm not sure but we may can handle this situation
with BP Attachments?
2. Why do we need storing image file names as meta value? If we want to
add this value to alt attribute of <img> tag or anywhere we want, can't we
use title or name of activity item?
If we decide to go with base64,
1. I think we need to move fetching and saving image process into a new
function. We should check remote request (like is it WP_Error object? and
HTTP response code. For example `wp_remote_get` returns a `WP_Error`
object when timeout). We also should check response data is empty at
least.
2. We should provide a filter for passing arguments to remote request. I
believe this could useful for developers when trying to send custom header
or user-agent. For example, our CDN is waiting for user agent to return
the images.
Thanks again!
[ 1 ]: https://developer.mozilla.org/en-US/docs/Glossary/Base64
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8581#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list