# Image zoom is not working

**URL:** https://meta.discourse.org/t/image-zoom-is-not-working/51898
**Category:** Bug
**Created:** [22 Ottobre 2016, 2:58pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898 "2016-10-22T14:58:32Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Pirat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirat/32/62176_2.png) [@Pirat](https://meta.discourse.org/u/Pirat)
#### Post date: [22 Ottobre 2016, 2:58pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/1 "2016-10-22T14:58:32Z")

</div>

It does not always work to increase the modal window  
I do not know how to replicate the bug but it is  
I tested on all browsers

 ![](https://global.discourse-cdn.com/meta/original/3X/d/3/d35b018f611bee3c37861dc853a1e0a63566e867.jpg)

**I have lost features such as zoom in images**

---

<div class="post-metadata">

### Author: ![Pirat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirat/32/62176_2.png) [@Pirat](https://meta.discourse.org/u/Pirat)
#### Post date: [22 Ottobre 2016, 4:55pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/2 "2016-10-22T16:55:06Z")

</div>

Just I figured out the reason

> [@Discourse Translator](https://meta.discourse.org/t/discourse-translator/32630):
>
> discourse2Summary Discourse Translator translates posts on Discourse using Microsoft, Google, or Yandex translation APIs.hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-translator](https://github.com/discourse/discourse-translator)open_bookInstall Guide [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157)Features Each post is only translated once per locale which saves you moneybagNote that language detection is also run once for every post. Be careful when enabli…

this plugin breaks pictures and video

## it needs to be fixed!

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [22 Ottobre 2016, 5:55pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/3 "2016-10-22T17:55:28Z")

</div>

Hi, I’d just like to point out that a human (namely @tgxworld) wrote that plugin without being paid for it, and provided it to you free of charge because he’s a nice guy who wants Discourse to be cooler. (He works for Discourse now, but I don’t think he did when this code was written, and either way this is not an officially supported plugin.)

So, while it’s great to report this issue, no one actually owes you a fix, and demanding one in big bold letters does not help matters. I’m sure @tgxworld or someone will be happy to fix it as their time allows.

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [22 Ottobre 2016, 7:00pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/4 "2016-10-22T19:00:04Z")

</div>

Yeah I think there is some confusion here. The plugin you have diagnosed as root cause is not an official Discourse plugin, therefore you are best reaching out to that plugin author.

Might I also suggest that in doing so, you reconsider your approach. Honey works better than vinegar.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22 Ottobre 2016, 8:04pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/5 "2016-10-22T20:04:17Z")

</div>

Translator is official though so this should be fixed @tgxworld

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [23 Ottobre 2016, 12:20am UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/6 "2016-10-23T00:20:24Z")

</div>

I sit corrected. Carry-on

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [23 Ottobre 2016, 2:26pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/7 "2016-10-23T14:26:59Z")

</div>

> [@Pirat](#):
>
> Just I figured out the reason

Did you remove/disable the plugin in order for the issue to resolve? Anything in `/logs`?

 ![](https://global.discourse-cdn.com/meta/original/3X/b/6/b680be35150752d28d09505d0346cc4a8f3e4551.png)

I have the plugin enabled on my dev instance and I’m not getting an error.

> [@Pirat](#):
>
> I do not know how to replicate the bug

I can’t replicate the bug as well so unless you can provide exact reproduction steps for the error you’re seeing, it is going to be hard for me to figure out where the bug is.

---

<div class="post-metadata">

### Author: ![Pirat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirat/32/62176_2.png) [@Pirat](https://meta.discourse.org/u/Pirat)
#### Post date: [23 Ottobre 2016, 4:25pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/10 "2016-10-23T16:25:07Z")

</div>

Refresh the page after translation

I updated the plugin  
Error remained

> [@Discourse Solved](https://meta.discourse.org/t/discourse-solved-accepted-answer-plugin/30155):
>
> discourse2Summary Discourse Solved allows users to accept solutions on topics in designated categories.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Enabling Solved The Solved plugin can be enabled from its settings, accessed from your admin/plugins page: After enabling the plugin, to switch on Solved for all categories use the allow solved on all topics site setting. Alternati…

If you do not have an error, try to connect this plug-in yet

Perhaps the error occurs because of two plug-ins, at the moment I have only two of their

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [23 Ottobre 2016, 4:56pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/11 "2016-10-23T16:56:16Z")

</div>

Ok the bug isn’t with `discourse-translator` but the plugin happens to trigger the bug.

To replica, run the following commands. Somehow saving a post with an `img` wrapped in `lightbox` will remove the `lightbox` even though the `Post#raw` hasn’t been changed.

```ruby
[2] pry(main)> post = Post.last

[3] pry(main)> post.cooked
=> "<p><div class=\"lightbox-wrapper\"><a data-download-href=\"//localhost:3000/uploads/default/34784374092783e2fef84b8bc96d9b54c11ceea0\" href=\"//localhost:3000/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" class=\"lightbox\" title=\"Sword reworks.gif\"><img src=\"//localhost:3000/uploads/default/optimized/1X/34784374092783e2fef84b8bc96d9b54c11ceea0_1_690x276.gif\" width=\"690\" height=\"276\"><div class=\"meta\">\n<span class=\"filename\">Sword reworks.gif</span><span class=\"informations\">1000x400 1000 KB</span><span class=\"expand\"></span>\n</div></a></div></p>\n\n<p>This is a test post</p>"

[4] pry(main)> post.save!
   (0.2ms) BEGIN
  User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 [["id", 1]]
  Topic Load (0.5ms) SELECT "topics".* FROM "topics" WHERE ("topics"."deleted_at" IS NULL) AND "topics"."id" = 11 LIMIT 1 [["id", 11]]
  User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 [["id", 1]]
  SQL (0.3ms) UPDATE "posts" SET "cooked" = '<p><img src="/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif" width="690" height="276"></p>

<p>This is a test post</p>', "baked_at" = '2016-10-23 16:51:22.486791', "updated_at" = '2016-10-23 16:51:22.487000' WHERE "posts"."id" = 28 [["cooked", "<p><img src=\"/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" width=\"690\" height=\"276\"></p>\n\n<p>This is a test post</p>"], ["baked_at", Sun, 23 Oct 2016 16:51:22 UTC +00:00], ["updated_at", Sun, 23 Oct 2016 16:51:22 UTC +00:00], ["id", 28]]
   (0.1ms) SAVEPOINT active_record_1
  UserAction Load (0.3ms) SELECT "user_actions".* FROM "user_actions" WHERE "user_actions"."action_type" = 5 AND "user_actions"."user_id" = 1 AND "user_actions"."acting_user_id" = 1 AND "user_actions"."target_post_id" = 28 AND "user_actions"."target_topic_id" = 11 LIMIT 1 [["action_type", 5], ["user_id", 1], ["acting_user_id", 1], ["target_post_id", 28], ["target_topic_id", 11]]
   (0.1ms) RELEASE SAVEPOINT active_record_1
  Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 [["id", 1]]
   (2.5ms) COMMIT
=> true

[5] pry(main)> post.cooked
=> "<p><img src=\"/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" width=\"690\" height=\"276\"></p>\n\n<p>This is a test post</p>"

```

---

<div class="post-metadata">

### Author: ![Pirat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirat/32/62176_2.png) [@Pirat](https://meta.discourse.org/u/Pirat)
#### Post date: [23 Ottobre 2016, 5:31pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/12 "2016-10-23T17:31:25Z")

</div>

I do not quite understand this means I need to do something, or what?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [23 Ottobre 2016, 5:54pm UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/13 "2016-10-23T17:54:24Z")

</div>

Is the data-download-href a URI but not a URL ?

```plaintext
localhost:3000/uploads/default/34784374092783e2fef84b8bc96d9b54c11ceea0

```

vs.

```plaintext
localhost:3000/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif

```

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [24 Ottobre 2016, 4:07am UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/14 "2016-10-24T04:07:48Z")

</div>

PR in

[https://github.com/discourse/discourse/pull/4513](https://github.com/discourse/discourse/pull/4513)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [27 Ottobre 2016, 9:28am UTC](https://meta.discourse.org/t/image-zoom-is-not-working/51898/15 "2016-10-27T09:28:29Z")

</div>


