diff --git a/res/drawable/ic_colorize_24px.xml b/res/drawable/ic_colorize_24px.xml
index 8363683..fb70972 100644
--- a/res/drawable/ic_colorize_24px.xml
+++ b/res/drawable/ic_colorize_24px.xml
@@ -14,8 +14,8 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="32dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <path
diff --git a/res/drawable/ic_font.xml b/res/drawable/ic_font.xml
index 6ce8308..f5df7ba 100644
--- a/res/drawable/ic_font.xml
+++ b/res/drawable/ic_font.xml
@@ -14,8 +14,8 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="32dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <!-- This path represents a square with rounded corners -->
diff --git a/res/drawable/ic_nav_wallpaper.xml b/res/drawable/ic_nav_wallpaper.xml
index a884a44..c935666 100644
--- a/res/drawable/ic_nav_wallpaper.xml
+++ b/res/drawable/ic_nav_wallpaper.xml
@@ -15,8 +15,8 @@
 -->
 <!-- Represents the wallpaper icon (a "landscape" shape in a box) -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="32dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <path
diff --git a/res/drawable/ic_shapes_24px.xml b/res/drawable/ic_shapes_24px.xml
index 6debc53..525f757 100644
--- a/res/drawable/ic_shapes_24px.xml
+++ b/res/drawable/ic_shapes_24px.xml
@@ -14,8 +14,8 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="32dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <path
diff --git a/res/drawable/ic_wifi_24px.xml b/res/drawable/ic_wifi_24px.xml
index 64834e0..0e27c57 100644
--- a/res/drawable/ic_wifi_24px.xml
+++ b/res/drawable/ic_wifi_24px.xml
@@ -14,8 +14,8 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="32dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <path
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index ddf84e8..985987f 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -18,6 +18,7 @@
 <resources>
     <dimen name="card_title_text_size">12sp</dimen>
     <dimen name="card_cover_title_text_size">14sp</dimen>
+    <dimen name="card_header_icon_size">24dp</dimen>
     <dimen name="card_header_top_margin">6dp</dimen>
     <dimen name="preview_card_padding">8dp</dimen>
     <dimen name="preview_card_top_padding">6dp</dimen>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5c98fda..b6aac0b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -66,6 +66,7 @@
 
     <dimen name="card_title_text_size">16sp</dimen>
     <dimen name="card_cover_title_text_size">24sp</dimen>
+    <dimen name="card_header_icon_size">32dp</dimen>
     <dimen name="card_header_top_margin">0dp</dimen>
     <dimen name="preview_pager_max_height">450dp</dimen>
     <dimen name="preview_pager_min_height">350dp</dimen>
diff --git a/src/com/android/customization/model/theme/DefaultThemeProvider.java b/src/com/android/customization/model/theme/DefaultThemeProvider.java
index 9fdb0c9..ce12d35 100644
--- a/src/com/android/customization/model/theme/DefaultThemeProvider.java
+++ b/src/com/android/customization/model/theme/DefaultThemeProvider.java
@@ -35,7 +35,6 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
 import android.content.res.Resources.NotFoundException;
 import android.service.wallpaper.WallpaperService;
 import android.text.TextUtils;
@@ -53,6 +52,7 @@
 import com.android.wallpaper.model.LiveWallpaperInfo;
 
 import com.bumptech.glide.request.RequestOptions;
+import com.google.android.apps.wallpaper.asset.ThemeBundleThumbAsset;
 
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -204,7 +204,7 @@
                         mStubApkResources.getIdentifier(WALLPAPER_ACTION_PREFIX + themeName,
                                 "string", mStubPackageName))
                         .setWallpaperAsset(wallpaperThumbnailResId != ID_NULL ?
-                                getDrawableResourceAsset(WALLPAPER_THUMB_PREFIX, themeName)
+                                getThumbAsset(WALLPAPER_THUMB_PREFIX, themeName)
                                 : getDrawableResourceAsset(WALLPAPER_PREFIX, themeName));
             } else {
                 // Try to see if it's a live wallpaper reference
@@ -234,7 +234,7 @@
                             LiveWallpaperInfo liveInfo = new LiveWallpaperInfo(wallpaperInfo);
                             builder.setLiveWallpaperInfo(liveInfo).setWallpaperAsset(
                                     wallpaperThumbnailResId != ID_NULL ?
-                                        getDrawableResourceAsset(WALLPAPER_THUMB_PREFIX, themeName)
+                                            getThumbAsset(WALLPAPER_THUMB_PREFIX, themeName)
                                         : liveInfo.getThumbAsset(mContext))
                                     .setWallpaperOptions(wallpaperOptions);
                         } catch (XmlPullParserException | IOException e) {
@@ -484,4 +484,11 @@
         return drawableResId == 0 ? null : new ResourceAsset(mStubApkResources, drawableResId,
                 RequestOptions.fitCenterTransform());
     }
+
+    private ThemeBundleThumbAsset getThumbAsset(String prefix, String themeName) {
+        int drawableResId = mStubApkResources.getIdentifier(prefix + themeName,
+                "drawable", mStubPackageName);
+        return drawableResId == 0 ? null : new ThemeBundleThumbAsset(mStubApkResources,
+                drawableResId);
+    }
 }
diff --git a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
index ff8da08..f918d8e 100644
--- a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
+++ b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
@@ -163,7 +163,13 @@
             @DrawableRes int headerIcon) {
         TextView header = container.findViewById(R.id.theme_preview_card_header);
         header.setText(headerTextResId);
-        header.setCompoundDrawablesWithIntrinsicBounds(0, headerIcon, 0, 0);
+
+        Context context = container.getContext();
+        Drawable icon = context.getResources().getDrawable(headerIcon, context.getTheme());
+        int size = context.getResources().getDimensionPixelSize(R.dimen.card_header_icon_size);
+        icon.setBounds(0, 0, size, size);
+
+        header.setCompoundDrawables(null, icon, null, null);
         header.setCompoundDrawableTintList(ColorStateList.valueOf(
                 header.getCurrentTextColor()));
     }
diff --git a/src/com/android/customization/picker/theme/ThemePreviewPage.java b/src/com/android/customization/picker/theme/ThemePreviewPage.java
index f00cd3f..0543b24 100644
--- a/src/com/android/customization/picker/theme/ThemePreviewPage.java
+++ b/src/com/android/customization/picker/theme/ThemePreviewPage.java
@@ -38,8 +38,7 @@
 
     @StringRes
     final int nameResId;
-    @DrawableRes
-    final int iconSrc;
+    final Drawable icon;
     @LayoutRes
     final int contentLayoutRes;
     @ColorInt
@@ -51,7 +50,13 @@
             @ColorInt int accentColor) {
         super(null);
         this.nameResId = titleResId;
-        this.iconSrc = iconSrc;
+        if (iconSrc != Resources.ID_NULL) {
+            this.icon = context.getResources().getDrawable(iconSrc, context.getTheme());
+            int size = context.getResources().getDimensionPixelSize(R.dimen.card_header_icon_size);
+            icon.setBounds(0, 0, size, size);
+        } else {
+            this.icon = null;
+        }
         this.contentLayoutRes = contentLayoutRes;
         this.accentColor = accentColor;
         this.inflater = LayoutInflater.from(context);
@@ -61,7 +66,7 @@
     public void bindPreviewContent() {
         TextView header = card.findViewById(R.id.theme_preview_card_header);
         header.setText(nameResId);
-        header.setCompoundDrawablesWithIntrinsicBounds(0, iconSrc, 0, 0);
+        header.setCompoundDrawables(null, icon, null, null);
         header.setCompoundDrawableTintList(ColorStateList.valueOf(accentColor));
         card.findViewById(R.id.theme_preview_top_bar).setVisibility(View.GONE);
         card.findViewById(R.id.edit_label).setVisibility(View.GONE);
diff --git a/src/com/google/android/apps/wallpaper/asset/ThemeBundleThumbAsset.java b/src/com/google/android/apps/wallpaper/asset/ThemeBundleThumbAsset.java
new file mode 100644
index 0000000..bc5f309
--- /dev/null
+++ b/src/com/google/android/apps/wallpaper/asset/ThemeBundleThumbAsset.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.android.apps.wallpaper.asset;
+
+import android.app.Activity;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Rect;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.os.AsyncTask;
+
+import androidx.annotation.Nullable;
+
+import com.android.wallpaper.asset.Asset;
+import com.android.wallpaper.module.DrawableLayerResolver;
+import com.android.wallpaper.module.InjectorProvider;
+
+public class ThemeBundleThumbAsset extends Asset {
+    private final Resources mRes;
+    private final int mResId;
+    private final DrawableLayerResolver mLayerResolver;
+
+    public ThemeBundleThumbAsset(Resources res, int resId) {
+        mRes = res;
+        mResId = resId;
+        mLayerResolver = InjectorProvider.getInjector().getDrawableLayerResolver();
+    }
+
+    @Override
+    public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) {
+        // No scaling is needed, as the thumbnail is already a thumbnail.
+        LoadThumbnailTask task = new LoadThumbnailTask(mRes, mResId, mLayerResolver, receiver);
+        task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+    }
+
+    @Override
+    public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight,
+            BitmapReceiver receiver) {
+
+    }
+
+    @Override
+    public void decodeRawDimensions(@Nullable Activity activity, DimensionsReceiver receiver) {
+
+    }
+
+    @Override
+    public boolean supportsTiling() {
+        return false;
+    }
+
+    /**
+     * AsyncTask subclass which loads the live wallpaper's thumbnail bitmap off the main UI thread.
+     * Resolves with null if live wallpaper thumbnail is not a bitmap.
+     */
+    private static class LoadThumbnailTask extends AsyncTask<Void, Void, Bitmap> {
+        private final DrawableLayerResolver mLayerResolver;
+        private final Resources mResources;
+        private final int mResId;
+        private BitmapReceiver mReceiver;
+
+        public LoadThumbnailTask(Resources res, int resId, DrawableLayerResolver resolver,
+                BitmapReceiver receiver) {
+            mLayerResolver = resolver;
+            mReceiver = receiver;
+            mResources = res;
+            mResId = resId;
+        }
+
+        @Override
+        protected Bitmap doInBackground(Void... unused) {
+            Drawable thumb = mResources.getDrawable(mResId, null);
+
+            // Live wallpaper components may or may not specify a thumbnail drawable.
+            if (thumb instanceof BitmapDrawable) {
+                return ((BitmapDrawable) thumb).getBitmap();
+            } else if (thumb instanceof LayerDrawable) {
+                Drawable layer = mLayerResolver.resolveLayer((LayerDrawable) thumb);
+                if (layer instanceof BitmapDrawable) {
+                    return ((BitmapDrawable) layer).getBitmap();
+                }
+            }
+
+            // If no thumbnail was specified, return a null bitmap.
+            return null;
+        }
+
+        @Override
+        protected void onPostExecute(Bitmap bitmap) {
+            mReceiver.onBitmapDecoded(bitmap);
+        }
+    }
+}
