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.

"unknown" image selection problem

July 21, 2012 2:04pm

Subscribe [2]
  • #1 / Jul 21, 2012 2:04pm

    Fritzinger

    35 posts

    TL;DR I have weird stuff going on with images.


    I’ve taken over a site for a client and am adding a thumbnail image field to a channel. The channel already had an article image field of type File (as far as I can tell no third party add-on is in use).

    The client had previously been sizing all of their images at thumbnail size. Now that I’ve added the thumbnail field, instead of uploading new images, I’m just pointing the thumbnail field at the already uploaded image. Later I will add new full size images to the old article image fields. For now though, I have two file fields pointing at the same image on the server. It works sometimes:

    http://www.webpagescreenshot.info/img/687212-721201283905PM

    ... after selecting the image, the publish page shows both fields with the same image. Perfect!

    Other times unfortunately not so much. Before and after below:

    0. http://www.webpagescreenshot.info/img/963212-721201284147PM

    ...this is a working entry that is unedited from the state that the site was in before I took over. For some reason the preview on the publish page doesn’t show a preview of the picture but I don’t really care about that, since it displays properly on the home page. BUT now look what happens when I select the same image in the “thumbnail” field:

    1. http://www.webpagescreenshot.info/img/479931-721201284303PM

    The “cocoon_thumb” picture is not visible in the modal dialog, but again I don’t care because at least I can hover over to identify the full title. So I select the image.

    2. http://www.webpagescreenshot.info/img/993701-721201284404PM

    ...now on the edit page, I don’t have a preview of the picture AND I don’t have the title - it just says “undefined”. Fearlessly I press on:

    3. http://www.webpagescreenshot.info/img/40799-721201284519PM

    ... after hitting submit, the summary of the entry shows just one URL, i.e. the 2nd reference to the image has not been saved (were it save correctly there would be two URLs). And the thumbnail does not show on the home page.

    I’m not sure what the pattern is here, as both the working example and the not working are jpegs. I do wonder if maybe the ones that weren’t working were those that the client had resized after upload. Most of my images on the site are jpegs, and mostly they follow the “not working” pattern.

    Any clues as to what could be going on?

  • #2 / Jul 23, 2012 2:17pm

    Dan Decker

    7338 posts

    Hi Fritzinger,

    Thanks for posting your question to the forums!

    Now seems like a great time to take a step back and make sure you are letting ExpressionEngine do as much work as it can for you.

    Depending on your version, ExpressionEngine is very likely creating thumbnails for your client. What version are you using?

    Otherwise, you can set up Image Manipulations to automatically resize images as they are uploaded. This would reduce the number of fields in the channel to just one, and EE would do the work on the fly.

    Then you make the change in the template to call the thumbnail or other sizes, and bingo! You’re all done.

    Let me know your version and I can get you the best solution.

    Cheers,

  • #3 / Jul 24, 2012 5:12am

    Fritzinger

    35 posts

    Could you give me a quick history of the image manipulation functionality? My client was on EE2 beta although I am in the process of upgrading to 2.5.2. There were a bunch of files named _thumb in the same upload directory so I’m wondering if that is the result of previous incarnations of image manipulation? Or did they likely just create those files manually themselves?

  • #4 / Jul 25, 2012 10:56am

    Dan Decker

    7338 posts

    Hi Fritzinger,

    I’m not entirely sure when Image Manipulations came to be in ExpressionEngine 2.x, but It’s Been a While Now™

    Are you seeing image files named with _thumb or additional folders with that name? ExpressionEngine automatically creates a _tumb(s) folder when you create an upload destination. Those auto-gnerated thumbnails are what ExpressionEngine uses in the File Manager and File Browser in the Control Panel.

    What you are seeing are likely the auto-generated thumbnails.

    Cheers,

  • #5 / Jul 28, 2012 2:15pm

    Fritzinger

    35 posts

    I guess what I was trying to point the thumbnail field towards were the old style EE generated myfile_thumb.jpg files.

    But a monster upgrade later and I think you’ve saved me from causing my client a lot of hassle.

  • #6 / Jul 30, 2012 4:09pm

    Dan Decker

    7338 posts

    But a monster upgrade later and I think you’ve saved me from causing my client a lot of hassle.

    I’m hoping that’s a good thing?

    Is there anything else I can assist you with?

    Cheers,

  • #7 / Jul 31, 2012 4:00am

    Fritzinger

    35 posts

    It’s a good thing. Nothing further 😊.

  • #8 / Jul 31, 2012 2:29pm

    Kyle Cotter

    730 posts

    Glad Dan was able to help you out, Fritzinger. Feel free to start a new thread if you have any more questions.

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases