ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image manipulation error?

April 06, 2012 6:52pm

Subscribe [3]
  • #1 / Apr 06, 2012 6:52pm

    Adam Culpepper

    1 posts

    This question may be related to a resolved thread.

    I’m using the code below and the image outputs just fine, but this error is thrown at the top of the page.

    I’m simply trying to output an image similar to the way I have below and dynamically pull the image width and height. If there’s another way to do this, please let me know!

    Code:
    {portfolio-image}
    {path}_small/{filename}.{extension}
    {/portfolio-image}

    Errors:
    A PHP Error was encountered
    Severity: Warning
    Message: array_merge() [function.array-merge]: Argument #1 is not an array
    Filename: libraries/Functions.php
    Line Number: 2585

    A PHP Error was encountered
    Severity: Warning
    Message: array_merge() [function.array-merge]: Argument #1 is not an array
    Filename: libraries/Functions.php
    Line Number: 2585

    A PHP Error was encountered
    Severity: Warning
    Message: array_merge() [function.array-merge]: Argument #1 is not an array
    Filename: libraries/Functions.php
    Line Number: 2585

    A PHP Error was encountered
    Severity: Warning
    Message: Cannot modify header information - headers already sent by (output started at /home/adamculp/public_html/ee/system/codeigniter/system/core/Exceptions.php:170)
    Filename: core/Common.php
    Line Number: 405

  • #2 / Apr 09, 2012 12:09pm

    Shane Eckert

    7174 posts

    Hello Adam,

    Welcome to the forums and to the community! It’s good to have you here.

    I am sorry to hear you are running into this problem.

    This sounds like this bug as far as I can tell. Your situation is a bit different but the error is exactly the same. Can you give the fix listed a try and let me know if that works?

    I will be on the lookout for your reply.

    Cheers,

  • #3 / Apr 09, 2012 2:35pm

    Adam Culpepper

    1 posts

    Thanks Shane, that seems to have worked.

    My next question, is how do I pull the dimensions of one of my custom thumbnail groups? The _small makes it pull the correct image, but it’s pulling the original dimentions. I’ve tried many variations that I’ve seen here and there. portfolio-image:small, width_small etc. nothing worked.

    {if portfolio-image}
     {portfolio-image}
      {path}_small/{filename}.{extension}
     {/portfolio-image}
    {/if}
  • #4 / Apr 10, 2012 1:43pm

    Shane Eckert

    7174 posts

    Hello Adam,

    I do not believe that the height and width are available for the thumbs.

    What do you see when you view the source. Does the width and height remain tags or is some value placed there? Would think the values for the portfolio image would be used.

    Cheers,

  • #5 / Apr 23, 2012 11:10am

    Mediakitchen

    261 posts

    Same problem here. It is returning the width of the original image (925) instead of the small image size which should be 300


    Width:925 | Height:512 | Small Width: 925

    <ul>
    {exp:channel:entries channel="test_channel" limit="60" dynamic_start="on" disable="member_data|pagination" }
    
     {post_image}Width:{width} | Height:{height}{/post_image}
     {post_image:small} | Small Width: {width}{/post_image}
    
    {/exp:channel:entries}
    </ul>

    Anyone found a solution yet?

  • #6 / Apr 24, 2012 5:11pm

    Shane Eckert

    7174 posts

    Hey Media Kitchen,

    I think what you are looking for is the Thumbnail Variables.


    Each file upload directory may be set to automatically generate thumbnail versions of an uploaded image file. You may display the following information for each auto-generated thumbnail:

    height
    width
    size
    file_url

    The variable for each of the above is created by combining the resize setting short name with the desired information, separated by an underscore. For example, if you have two resized images created with shortnames ‘small’ and ‘medium’, the code to display the url for each would be:

    {small_file_url}
    {medium_file_url}

    Cheers,

  • #7 / Apr 25, 2012 5:13am

    Mediakitchen

    261 posts

    Thanks for the reply Shane

    So are you saying to get the width of an image with a short name of “small”, I need to do the following?

    <ul>
    {exp:channel:entries channel="test_channel" limit="60" dynamic_start="on" disable="member_data|pagination" }

      {post_image:small} | Small Width: {small_width}{/post_image}

    {/exp:channel:entries}
    </ul>

  • #8 / Apr 26, 2012 3:16pm

    Shane Eckert

    7174 posts

    Hello Mediakitchen,

    Did you test that block of code? It looks close.

    Are you generating thumbnails?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases