Home Forums Plugin Support WP User Frontend Pro image size H/W and file size a big issue

This topic is: resolved

This topic contains 8 replies, has 4 voices, and was last updated by  Sekander Badsha 4 years, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #28141

    Craig
    Member
    Post count: 4

    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.

    #28150

    Chris Swede
    Member
    Post count: 56

    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).

    #28162

    Craig
    Member
    Post count: 4

    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.

    #28214

    Sekander Badsha
    Member
    Post count: 2067

    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”

    #28218

    Craig
    Member
    Post count: 4

    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.

    #28513

    Nayem
    Moderator
    Post count: 6480

    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 ๐Ÿ™‚

    #28518

    Craig
    Member
    Post count: 4

    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

    #28646

    Craig
    Member
    Post count: 4

    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.

    #28752

    Sekander Badsha
    Member
    Post count: 2067

    Thank you for posting the solution here ๐Ÿ™‚

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘image size H/W and file size a big issue’ is closed to new replies.