image size H/W and file size a big issue

This topic contains 8 reply and 4 voices, and was last updated by Sekander Badsha 10 years, 1 month ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
October 10, 2014 at 3:29 pm 28141
Sekander Badsha I want to use this plugin to allow members of the general public to submit items they have for sale. Of course I want them to include a photo of the item. Most people will use their phone to create the item image. 2 Problems 1 The file size is too large (2.3MB) and there is no way for the plugin to auto filter the file. This problem relies on the average person knowing how to change the file size of their photo. this is not realistic for the average person and they will just give up on the idea of posting on my site. If you don't have a work around for this perhaps you know of a 3rd party plugin that automatically filters down the file size and works with your plugin without me having to get involved in process. increasing the file size allowance for 200 - 300 posts is not a practical answer. 2 The image dimensions are too large (3000 x 2000) from a phone. How do I get the plugin to resize the height and width of images to a max-width that is realistic (400 x 400) while also allowing for images to show in excerpts to represent the post. Ps. I'm not a developer, that is why I use a plugin, so if you can help without the need to start digging into php files that would be great. I simply want users to be able to submit photos with their content without the photos taking control of the post space at will. Many thanks Craig.
October 11, 2014 at 12:14 am 28150
Chris Swede Chris Swede

Hi,

You can set the maximum image size uploaded in your Settings -> Media in WP-admin. Any images larger than the size you set will be downsized.
For greater control, you can auto resize uploaded images with the function add_image_size

An example:

if ( function_exists( 'add_image_size' ) ) { 
	add_image_size( 'size-140', 140, 140 );
	add_image_size( 'size-400', 400, 350 );
	add_image_size( 'center', 550, 367, array( 'center', 'center' ) ); //center crop
}

In a loop, you can then get the image you choose, eg size-400 with

$image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'size-400'); $url = $image[0];

and display it:

<img src="<?php echo $url ?>" />

To use this in a single post, read Chip Bennet’s reply in this thread (untested).

October 11, 2014 at 12:02 pm 28162
Craig Craig

Hi Chris.
Perhaps a big part of the problem I am having is that regardless of the settings > media >image size settings, the image continues to render max post width. I set the large size to 300 but it still renders as 600+. I tried to use Auto Excerpt Everywhere plugin thinking it would control the image size on the home page. While Auto Excerpt Everywhere behaved as expected, [image / excerpt] a copy of the image appears, max width, above the excerpt.

It gives me the impression the the UFP plugin is setting the rules for image inclusion and size.

I am getting so fed up with plugins that require the end user to rewrite code in order for them to meet “realistic” expectations. It stuns me that with all the complex themes that are being built with wordpress that there doesn’t seem to be even one simple theme that allows for straightforward frontend public user submissions.

Frustrated.

October 12, 2014 at 4:43 pm 28214
Sekander Badsha Sekander Badsha

Hello Craig,
We do not have any feature to compress the images or to resize. So this topic is not related to our plugin and I’m marking this as “Not a Support Question”

October 12, 2014 at 4:56 pm 28218
Craig Craig

Not a problem Sekander. If there is nothing you can do about it then I will have look at another way to manage it.

Is there any way to stop the plugin from overriding the the image size set in the admin or to prevent it from forcing its way onto the blog-list. I described the problem in the previous comment.

October 16, 2014 at 12:05 pm 28513
Nayem Nayem

Hello Craig,

I think there might be a theme or plugin conflict.

Please check for your theme or plugin conflicts. You can disable all your plugins except user fronted and switch to a default WordPress theme like-Twenty Twelve and let me know the result.

Thank you 🙂

October 16, 2014 at 1:01 pm 28518
Craig Craig

Hi Nayem.
I have been testing on localhost running 2012 but when I get some time, early next week, I am going to do a fresh instal and do a systematic test of theme posting without plugin and then with frontend pro to see if I can get a better picture of the problem.

Thanks for getting back to me

Craig

October 19, 2014 at 5:09 am 28646
Craig Craig

Guys. It turns out that all the problems that I was having with the featured image dominating the blog feed could be resolved by adding 13 characters of code to the content.php file for the theme. And the problem had nothing to do with your plugin but is likely to do with changes to wordpress featured image and post thumbnail rules.

To take out the featured image in the blog feed and category search results I changed this

<?php if ( ! post_password_required() && ! is_attachment() ) :
				the_post_thumbnail();
			endif; ?>

To this

<?php if ( is_single() && ! post_password_required() && ! is_attachment() ) :
				the_post_thumbnail();
			endif; ?>

Now I can use an excerpt plugin to manage the image as part of the excerpt while maintaining the full size featured image only on individual posts. It’s a great way to tidy up a homepage with lots of people contributing to the site making it easier for readers to scan for posts that are relevant.

October 20, 2014 at 9:17 pm 28752
Sekander Badsha Sekander Badsha

Thank you for posting the solution here 🙂

Viewing 8 Posts - 1 through 8 (of 8 total)