Adding a thumbnail for an image attachment / Re-using an attachment

Discussion in 'Forum Announcements and Feedback' started by Junglekeeper, May 3, 2017.

  1. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    I compiled the following information after learning how to reuse an existing attachment as I thought it may be useful for other members.

    One is given the option to insert a thumbnail after an image has been uploaded into a post. The bbCode generated is:
    Code:
    [ATTACH]aNum[/ATTACH]
    
    where aNum is the attachment number assigned by the system
    When the same code is used in a different post, a thumbnail is not created, but rather a regular link with the text "View attachment aNum". In such instances a thumbnail can be created as follows:
    1. Copy the link location of the thumbnail in the original post or the link "View attachment aNum";
    2. Click the position in the text where the thumbnail is to be inserted;
    3. Click on the Image icon, paste the location into the 'Image URL' field, then click Insert.
    By doing so, a copy of the original image is automatically uploaded into the post and a thumbnail is generated at the insertion point.

    (Credit to @wcutler for this workaround: How does one upload a photo from another posting?)

    @Daniel Mosquin
    For the sake of consistency, how about changing the size of the thumbnail created in this manner to match that of a manually uploaded image? Also, there is a related discussion in the Xenforo forums that may be of interest: Re-using attachments

    Note:
    The difference in size of the thumbnails in the following two posts is not apparent. The original is 225 x 168 pixels compared to 225 x 169 pixels of its copied counterparts. In a similar test using a portrait image the numbers were 168 x 225 pixels and 225 x 300 pixels respectively, resulting in a more noticeable difference.
     
    Last edited: May 3, 2017
  2. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    (A) Thumbnail inserted into original post for attachment 149702.
    20170430_134107.jpg
     
  3. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    (B) Link resulting from inserting bbCode [ATTACH]149702[/ATTACH].
    View attachment 149702

    (C) Thumbnail resulting from inserting image using link location of thumbnail in (A).
    20170430_134107-jpg.149702.jpg

    (D) Thumbnail resulting from inserting image using link location of link in (B).
    149702.jpg
     
  4. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,792
    Likes Received:
    2,225
    Location:
    Vancouver, BC Canada
    I do not have time to check this out yet, but I'm wondering if after the copy, can you not go into Edit, More Options and click the Thumbnail button there?
    +*+
    Wendy
     
  5. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    Yes. Once the system has attached a copy of the original image to the post, the option to insert its thumbnail becomes available, just as if it had been inserted manually. In most cases its use would be limited to that of further editing of the post.
     
    Last edited: May 5, 2017
  6. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,792
    Likes Received:
    2,225
    Location:
    Vancouver, BC Canada
    I do not understand the issue, sorry. I did a test in another thread (in the Test Bed, your thread), came back here, copied the link location from (A); went back to my Test Bed posting, clicked the Image icon, pasted in the url. It showed me the large photo, but when I Posted the reply, it reduced the image to a thumbnail which brings up the large image when clicked. There is no need to insert anything else or click on anything else.

    Are you saying that I should add this to the Attach photos and files resource? Now that we have our proper skin, I should redo the video, but I need to find someone who can speak in whole sentences. And I need to learn how to do the capture. I had half of it figured out a year or so ago but I forget which half.
     
    Last edited: May 9, 2017
  7. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    The information is here, as is. It's up to you to decide whether it's useful and how it should be incorporated into the current resources. Is there really a need to change the existing resource? I just thought this would be added as a separate 'How-to' thread, without the need for a video of its own, and perhaps linked to from the main resource.
     
  8. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,792
    Likes Received:
    2,225
    Location:
    Vancouver, BC Canada
    I did see in the xenForo thread an issue concerning the deletion of the posting containing the original photo. I just did a test where I used the url of a photo, then deleted the thread that photo was in. My posting where I used the photo still displays it.

    So does that mean that the file has been duplicated after all, and it's not just linking to the original location? Is there any savings here, then, other than the upload and the system doing the reduction to 1200x1500 pixels? Instead of uploading the file again, it is copying it and saving it.

    Or is the re-use just a link, and there is some code that keeps track of what all postings are using the photo and only deletes it if all uses have been deleted (as someone on xenForo suggested it should do)?
     
  9. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,987
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    Hmm...interesting. It turns out I found out about this aspect of [IMG] some time ago but had forgotten all about it. Anyway, the system is making a COPY of the specified image, as stated by Daniel. However because it's being done at the server level it's much faster than it is for the user to re-upload the image.
     

Share This Page