Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java	(revision 16059)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java	(revision 16060)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.ImageResource;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -33,4 +34,5 @@
      */
     private Image img;
+    private ImageResource imageResource;
 
     /**
@@ -108,4 +110,12 @@
             return getImage();
         }
+    }
+
+    /**
+     * Get the image resource associated with this MapImage object.
+     * @return the image resource
+     */
+    public ImageResource getImageResource() {
+        return imageResource;
     }
 
@@ -139,6 +149,7 @@
                 .setHeight(height)
                 .setOptional(true)
-                .getAsync(result -> {
+                .getResourceAsync(result -> {
                     synchronized (this) {
+                        imageResource = result;
                         if (result == null) {
                             source.logWarning(tr("Failed to locate image ''{0}''", name));
@@ -146,5 +157,5 @@
                             img = noIcon == null ? null : noIcon.getImage();
                         } else {
-                            img = rescale(result.getImage());
+                            img = rescale(result.getImageIcon().getImage());
                         }
                         if (temporary) {
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 16059)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 16060)
@@ -68,4 +68,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.ImageResource;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Utils;
@@ -206,4 +207,8 @@
         }
         return null;
+    }
+
+    public final ImageResource getImageResource() {
+        return (ImageResource) getValue("ImageResource");
     }
 
@@ -229,5 +234,5 @@
                     GuiHelper.runInEDT(() -> {
                         try {
-                            result.attachImageIcon(this);
+                            result.attachImageIcon(this, true);
                         } catch (IllegalArgumentException e) {
                             Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 16059)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 16060)
@@ -308,7 +308,4 @@
     private static final Map<OsmPrimitiveType, ImageIcon> osmPrimitiveTypeCache = new EnumMap<>(OsmPrimitiveType.class);
 
-    /** larger cache of critical padded image icons used in many parts of the application */
-    private static final Map<Dimension, Map<Image, ImageIcon>> paddedImageCache = new HashMap<>();
-
     private static final ExecutorService IMAGE_FETCHER =
             Executors.newSingleThreadExecutor(Utils.newThreadFactory("image-fetcher-%d", Thread.NORM_PRIORITY));
@@ -841,7 +838,4 @@
         synchronized (ROTATE_CACHE) {
             ROTATE_CACHE.clear();
-        }
-        synchronized (paddedImageCache) {
-            paddedImageCache.clear();
         }
         synchronized (osmPrimitiveTypeCache) {
@@ -1556,7 +1550,7 @@
             final Optional<ImageIcon> icon = TaggingPresets.getMatchingPresets(primitive).stream()
                     .sorted(Comparator.comparing(p -> p.types == null || p.types.isEmpty() ? Integer.MAX_VALUE : p.types.size()))
-                    .map(TaggingPreset::getIcon)
+                    .map(TaggingPreset::getImageResource)
                     .filter(Objects::nonNull)
-                    .map(imageIcon -> getPaddedIcon(imageIcon.getImage(), iconSize))
+                    .map(resource -> resource.getPaddedIcon(iconSize))
                     .findFirst();
             if (icon.isPresent()) {
@@ -1568,5 +1562,5 @@
         return options.contains(GetPaddedOptions.NO_DEFAULT)
                 ? null
-                : getPaddedIcon(get(primitive.getDisplayType()).getImage(), iconSize);
+                : new ImageProvider("data", primitive.getDisplayType().getAPIName()).getResource().getPaddedIcon(iconSize);
     }
 
@@ -1596,7 +1590,7 @@
                 NodeElement nodeStyle = (NodeElement) style;
                 MapImage icon = nodeStyle.mapImage;
-                if (icon != null &&
+                if (icon != null && icon.getImageResource() != null &&
                         (icon.name == null || !options.contains(GetPaddedOptions.NO_DEPRECATED) || !icon.name.contains("deprecated"))) {
-                    return getPaddedIcon(icon, iconSize);
+                    return icon.getImageResource().getPaddedIcon(iconSize);
                 }
             }
@@ -1605,49 +1599,32 @@
     }
 
-    /**
-     * Returns an {@link ImageIcon} for the given map image, at the specified size.
-     * Uses a cache to improve performance.
-     * @param mapImage map image
-     * @param iconSize size in pixels
-     * @return an {@code ImageIcon} for the given map image, at the specified size
-     * @see #clearCache
-     * @since 14284
-     */
-    public static ImageIcon getPaddedIcon(MapImage mapImage, Dimension iconSize) {
-        return getPaddedIcon(mapImage.getImage(false), iconSize);
-    }
-
-    private static ImageIcon getPaddedIcon(Image mapImage, Dimension iconSize) {
-        synchronized (paddedImageCache) {
-            return paddedImageCache.computeIfAbsent(iconSize, x -> new HashMap<>()).computeIfAbsent(mapImage, icon -> {
-                int backgroundRealWidth = GuiSizesHelper.getSizeDpiAdjusted(iconSize.width);
-                int backgroundRealHeight = GuiSizesHelper.getSizeDpiAdjusted(iconSize.height);
-                int iconRealWidth = icon.getWidth(null);
-                int iconRealHeight = icon.getHeight(null);
-                BufferedImage image = new BufferedImage(backgroundRealWidth, backgroundRealHeight, BufferedImage.TYPE_INT_ARGB);
-                double scaleFactor = Math.min(
-                        backgroundRealWidth / (double) iconRealWidth,
-                        backgroundRealHeight / (double) iconRealHeight);
-                Image scaledIcon;
-                final int scaledWidth;
-                final int scaledHeight;
-                if (scaleFactor < 1) {
-                    // Scale icon such that it fits on background.
-                    scaledWidth = (int) (iconRealWidth * scaleFactor);
-                    scaledHeight = (int) (iconRealHeight * scaleFactor);
-                    scaledIcon = icon.getScaledInstance(scaledWidth, scaledHeight, Image.SCALE_SMOOTH);
-                } else {
-                    // Use original size, don't upscale.
-                    scaledWidth = iconRealWidth;
-                    scaledHeight = iconRealHeight;
-                    scaledIcon = icon;
-                }
-                image.getGraphics().drawImage(scaledIcon,
-                        (backgroundRealWidth - scaledWidth) / 2,
-                        (backgroundRealHeight - scaledHeight) / 2, null);
-
-                return new ImageIcon(image);
-            });
-        }
+    static BufferedImage createPaddedIcon(Image icon, Dimension iconSize) {
+        int backgroundRealWidth = GuiSizesHelper.getSizeDpiAdjusted(iconSize.width);
+        int backgroundRealHeight = GuiSizesHelper.getSizeDpiAdjusted(iconSize.height);
+        int iconRealWidth = icon.getWidth(null);
+        int iconRealHeight = icon.getHeight(null);
+        BufferedImage image = new BufferedImage(backgroundRealWidth, backgroundRealHeight, BufferedImage.TYPE_INT_ARGB);
+        double scaleFactor = Math.min(
+                backgroundRealWidth / (double) iconRealWidth,
+                backgroundRealHeight / (double) iconRealHeight);
+        Image scaledIcon;
+        final int scaledWidth;
+        final int scaledHeight;
+        if (scaleFactor < 1) {
+            // Scale icon such that it fits on background.
+            scaledWidth = (int) (iconRealWidth * scaleFactor);
+            scaledHeight = (int) (iconRealHeight * scaleFactor);
+            scaledIcon = icon.getScaledInstance(scaledWidth, scaledHeight, Image.SCALE_SMOOTH);
+        } else {
+            // Use original size, don't upscale.
+            scaledWidth = iconRealWidth;
+            scaledHeight = iconRealHeight;
+            scaledIcon = icon;
+        }
+        image.getGraphics().drawImage(scaledIcon,
+                (backgroundRealWidth - scaledWidth) / 2,
+                (backgroundRealHeight - scaledHeight) / 2, null);
+
+        return image;
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/ImageResource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 16059)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 16060)
@@ -277,4 +277,17 @@
     }
 
+    /**
+     * Returns an {@link ImageIcon} for the given map image, at the specified size.
+     * Uses a cache to improve performance.
+     * @param iconSize size in pixels
+     * @return an {@code ImageIcon} for the given map image, at the specified size
+     */
+    public ImageIcon getPaddedIcon(Dimension iconSize) {
+        final Dimension cacheKey = new Dimension(-iconSize.width, -iconSize.height); // use negative width/height for differentiation
+        final BufferedImage image = imgCache.computeIfAbsent(cacheKey, ignore ->
+                ImageProvider.createPaddedIcon(getImageIcon().getImage(), iconSize));
+        return new ImageIcon(image);
+    }
+
     @Override
     public String toString() {
