Page MenuHomePhabricator

When `{meme ...}` embed has no text, just use the raw file data unmodified
ClosedPublic

Authored by epriestley on Nov 6 2018, 5:13 PM.
Tags
None
Referenced Files
F15562224: D19777.id47238.diff
Wed, Apr 30, 1:11 AM
F15558957: D19777.id47242.diff
Tue, Apr 29, 6:17 AM
F15553715: D19777.id47242.diff
Mon, Apr 28, 3:22 AM
F15548084: D19777.id.diff
Sat, Apr 26, 9:46 PM
F15540821: D19777.diff
Fri, Apr 25, 9:05 AM
F15469332: D19777.diff
Apr 4 2025, 12:08 PM
F15469037: D19777.id47242.diff
Apr 4 2025, 8:28 AM
F15448421: D19777.id47238.diff
Mar 28 2025, 4:47 AM
Subscribers
None

Details

Summary

Ref T13216. See PHI948. When you use the remarkup hint button to embed a meme with no text, you get {meme src=X}.

If the source is a GIF, we currently split the source apart into frame-by-frame images, process them, and stitch them back together. The end result is the same image we started with, but this process can be slow/expensive, and may timeout for sufficiently large GIFs.

Instead: when there's no text, just return the original image data.

Test Plan
  • Used {meme src=X} with no text, got an image faster.
  • Used {meme src=X, above=...} to add text, got an attempt to add text (which didn't get very far locally since I don't have GD configured).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable