Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to not display original photo (4.5 MB) but download and show only medium size.? #104

Open
podporujeme opened this issue Jan 28, 2024 · 9 comments

Comments

@podporujeme
Copy link

How to not display original photo (4.5 MB) but download and show only medium size.?
by some php snippet, or u add to plugin pls?

imp

@imath
Copy link
Member

imath commented Jan 29, 2024

Hi, the only way to do it so far is to privately upload the media. We surely need to offer a way to disable large image display: a possible way is to shrink resolution like WordPress does when generating image with specific sizes (thumbnail, medium, large. etc.

Thanks for sharing this point.

@podporujeme
Copy link
Author

@imath for this plugin u can automatic resize image for max resolution 800px width... buddypress is "social network" People dont need view large photos.

@dcavins
Copy link

dcavins commented Feb 1, 2024

Ha, we can never assume we know how a plugin is going to be used. Users will always find a novel way to use something that surprises us as devs (and sometimes delights us, too). :D

I promise that some users will want to use it as a photo sharing repository and will want to store high-res images.

@podporujeme
Copy link
Author

something like this? (if is blank or zero is disable)
Untitled

@imath
Copy link
Member

imath commented Feb 1, 2024

I agree with @dcavins I believe the best way is to generate a shrinked image for preview and the original one for download.

@podporujeme
Copy link
Author

Yes that would be great.

@bclaim
Copy link

bclaim commented Feb 10, 2024

@imath Just putting in my vote for this too. If we're able to control this through constants, like in BuddyPress, that would be awesome!

An example could be:

define ( 'BP_ATTACHMENTS_THUMB_WIDTH', 350 );
define ( 'BP_ATTACHMENTS_THUMB_HEIGHT', 400 );
define ( 'BP_ATTACHMENTS_FULL_WIDTH', 700 );
define ( 'BP_ATTACHMENTS_FULL_HEIGHT', 800 );
define ( 'BP_ATTACHMENTS_ORIGINAL_MAX_WIDTH', 1024 );
define ('BP_ATTACHMENTS_ORIGINAL_MAX_FILESIZE', 1024 );

@imath
Copy link
Member

imath commented Feb 10, 2024

Hi @bclaim thanks for your suggestion 😍

@podporujeme
Copy link
Author

@bclaim Hello, if i input this code to php snippet, it will work? Or i need some modification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants