Skip to content

Slideshow shows full-size images rather than thumbnails #14

Description

@nyanpasu64

The slideshow <img src=""> includes the full-size attachments, even for small slideshows. This easily results in tens of megabytes downloaded, which is wasteful on capped connections and disastrous on slow ones.

After wading through the source code, I've narrowed it down to this line:

https://github.com/Boonstra/Slideshow/blob/master/views/SlideshowPluginSlideshowSlide/frontend_attachment.php#L93

(in retrospect, it would've been faster to search Github for "wp_get_attachment_image_src", rather than tracing my way from

through about eight function calls.)

You should use the second argument $size to fix this. (https://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src)

To automate this process, you could use https://codex.wordpress.org/Function_Reference/wp_get_attachment_image instead. (I'm not sure if this is the best idea.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions