• Resolved randysizemore

    (@randysizemore)


    I get the following warning when creating new portfolio pages. I am pretty good with CSS but am lost with PHP. Site was working great last week. This particular theme can link to image or a portfolio item (essentially a page layout with both image and description that loads) If I select image as the portfolio type everything works great. If I select document – I get this message.

    Warning: getimagesize(/home/103972/domains/mysite.com/html/wp-content/uploads/2012/05/filenameX.jpg ) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c07/h03/mnt/103972/domains/mysite.com/html/wp-content/themes/breathe1.0.1/theme-functions/thshpr_image_resize.php on line 40

    I’ve already admitted that I don’t know enough about php but it appears to me that it’s adding a extra info that isn’t needed to the path. I checked the htaccess file and didn’t see anything odd.

    I have also ftp’d into the site and my images are resizing properly inside wp-content/uploads and if enter in the path for the image file in a browser the image loads properly.

    I am at a loss any help greatly appreciated

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you put the code in the file thshpr_image_resize.php up on https://pastebin.com and paste a link back to this topic.

    Also if you know the code that is calling the function, paste that in a second pastebin.

    David

    Thread Starter randysizemore

    (@randysizemore)

    https://pastebin.com/3z3weXvq

    I’m not sure the code that is calling the function but you can view the page at: https://blog.fratellistudio.com/?page_id=3244

    all the images, video, etc work except the first image of the studio

    A quick look at the website images, the linked images are all 630px wide, but the studio shot full size ( /thisISsilly.jpg ) is only 560px wide.

    From the pastebin code!

    // checking if the file size is larger than the target size
    // if it is smaller or the same size, stop right here and return

    At a guess I would think that function looks for an image at least 630px wide, the main image needs to be at least 631px wide so it can be sized?

    Replace the image with a larger one and see if it still errors.

    HTH

    David

    I can see it is now working with the 560px image width, so it was not what I suggested, what was the problem?

    Regards

    David

    Thread Starter randysizemore

    (@randysizemore)

    Thanks so much for the suggestion and assistance, unfortunately that was not the issue. Believe it or not, it turned out to be that the portfolio item had been created with the visual editor and was adding extra spaces to the filename. (or someone thought it was a good idea to insert spaces after the filename)

    Can’t believe I didn’t see that right away, guess creative directors don’t make very good developers ??

    Thread Starter randysizemore

    (@randysizemore)

    Is there a way for me to close the post now that my issue is resolved or will admin take care of it?

    On the right change the staus to [ resolved [^], it will stay in the forum so other might find it in the search and resolve their issues.

    HTH

    David

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning: getimagesize’ is closed to new replies.